Example #1
0
 public override bool CanCreateKeyIdentifierClause <T>() where T : SecurityKeyIdentifierClause
 {
     this.ThrowIfDisposed();
     if (typeof(T) == typeof(X509SubjectKeyIdentifierClause))
     {
         return(X509SubjectKeyIdentifierClause.CanCreateFrom(this.certificate));
     }
     if ((!(typeof(T) == typeof(X509ThumbprintKeyIdentifierClause)) && !(typeof(T) == typeof(X509IssuerSerialKeyIdentifierClause))) && !(typeof(T) == typeof(X509RawDataKeyIdentifierClause)))
     {
         return(base.CanCreateKeyIdentifierClause <T>());
     }
     return(true);
 }
Example #2
0
        public override bool CanCreateKeyIdentifierClause <T>()
        {
            ThrowIfDisposed();
            if (typeof(T) == typeof(X509SubjectKeyIdentifierClause))
            {
                return(X509SubjectKeyIdentifierClause.CanCreateFrom(certificate));
            }

            return(typeof(T) == typeof(X509ThumbprintKeyIdentifierClause) ||
                   typeof(T) == typeof(X509IssuerSerialKeyIdentifierClause) ||
                   typeof(T) == typeof(X509RawDataKeyIdentifierClause) ||
                   base.CanCreateKeyIdentifierClause <T>());
        }