Пример #1
0
        private JsonObject GetMessageHeader(string url, Nonce nonce)
        {
            var header = new JsonObject {
                { "alg", AlgorithmNames.RS256 },
                { "nonce", nonce.Value },
                { "url", url }
            };

            if (_accountUrl != null)
            {
                header.Add("kid", _accountUrl);
            }
            else
            {
                var jwk = Jwk.FromRSAParameters(_privateKey.ExportParameters(includePrivateParameters: false));

                header.Add("jwk", JsonObject.FromObject(jwk));
            }

            return(header);
        }
Пример #2
0
 public AcmeMessageHeader(Nonce nonce, string url)
 {
     Nonce = nonce.Value;
     Url   = url;
 }