示例#1
0
 public byte[] GetCertificateContent()
 {
     if (string.IsNullOrEmpty(CertificateContent))
     {
         return(null);
     }
     return(JwsHelper.Base64UrlDecode(CertificateContent));
 }
示例#2
0
        public void SaveCertificate(Stream s)
        {
            if (string.IsNullOrEmpty(CertificateContent))
            {
                throw new InvalidOperationException("Certificate content is missing or empty");
            }

            var raw = JwsHelper.Base64UrlDecode(CertificateContent);

            s.Write(raw, 0, raw.Length);
        }