GetInstance() 공개 정적인 메소드

public static GetInstance ( object obj ) : CmpCertificate
obj object
리턴 CmpCertificate
예제 #1
0
        public virtual CmpCertificate[] GetCAPubs()
        {
            if (caPubs == null)
            {
                return(null);
            }

            CmpCertificate[] results = new CmpCertificate[caPubs.Count];
            for (int i = 0; i != results.Length; ++i)
            {
                results[i] = CmpCertificate.GetInstance(caPubs[i]);
            }
            return(results);
        }
예제 #2
0
 private CertOrEncCert(Asn1TaggedObject tagged)
 {
     if (tagged.TagNo == 0)
     {
         certificate = CmpCertificate.GetInstance(tagged.GetObject());
     }
     else if (tagged.TagNo == 1)
     {
         encryptedCert = EncryptedValue.GetInstance(tagged.GetObject());
     }
     else
     {
         throw new ArgumentException("unknown tag: " + tagged.TagNo, "tagged");
     }
 }
예제 #3
0
 private CertOrEncCert(Asn1TaggedObject tagged)
 {
     //IL_0055: Unknown result type (might be due to invalid IL or missing references)
     if (tagged.TagNo == 0)
     {
         certificate = CmpCertificate.GetInstance(tagged.GetObject());
         return;
     }
     if (tagged.TagNo == 1)
     {
         encryptedCert = EncryptedValue.GetInstance(tagged.GetObject());
         return;
     }
     throw new ArgumentException(string.Concat((object)"unknown tag: ", (object)tagged.TagNo), "tagged");
 }
예제 #4
0
 private CAKeyUpdAnnContent(Asn1Sequence seq)
 {
     oldWithNew = CmpCertificate.GetInstance(seq[0]);
     newWithOld = CmpCertificate.GetInstance(seq[1]);
     newWithNew = CmpCertificate.GetInstance(seq[2]);
 }
예제 #5
0
파일: PKIBody.cs 프로젝트: 894880010/MP
        private static Asn1Encodable GetBodyForType(
            int type,
            Asn1Encodable o)
        {
            switch (type)
            {
            case TYPE_INIT_REQ:
                return(CertReqMessages.GetInstance(o));

            case TYPE_INIT_REP:
                return(CertRepMessage.GetInstance(o));

            case TYPE_CERT_REQ:
                return(CertReqMessages.GetInstance(o));

            case TYPE_CERT_REP:
                return(CertRepMessage.GetInstance(o));

            case TYPE_P10_CERT_REQ:
                return(CertificationRequest.GetInstance(o));

            case TYPE_POPO_CHALL:
                return(PopoDecKeyChallContent.GetInstance(o));

            case TYPE_POPO_REP:
                return(PopoDecKeyRespContent.GetInstance(o));

            case TYPE_KEY_UPDATE_REQ:
                return(CertReqMessages.GetInstance(o));

            case TYPE_KEY_UPDATE_REP:
                return(CertRepMessage.GetInstance(o));

            case TYPE_KEY_RECOVERY_REQ:
                return(CertReqMessages.GetInstance(o));

            case TYPE_KEY_RECOVERY_REP:
                return(KeyRecRepContent.GetInstance(o));

            case TYPE_REVOCATION_REQ:
                return(RevReqContent.GetInstance(o));

            case TYPE_REVOCATION_REP:
                return(RevRepContent.GetInstance(o));

            case TYPE_CROSS_CERT_REQ:
                return(CertReqMessages.GetInstance(o));

            case TYPE_CROSS_CERT_REP:
                return(CertRepMessage.GetInstance(o));

            case TYPE_CA_KEY_UPDATE_ANN:
                return(CAKeyUpdAnnContent.GetInstance(o));

            case TYPE_CERT_ANN:
                return(CmpCertificate.GetInstance(o));

            case TYPE_REVOCATION_ANN:
                return(RevAnnContent.GetInstance(o));

            case TYPE_CRL_ANN:
                return(CrlAnnContent.GetInstance(o));

            case TYPE_CONFIRM:
                return(PkiConfirmContent.GetInstance(o));

            case TYPE_NESTED:
                return(PkiMessages.GetInstance(o));

            case TYPE_GEN_MSG:
                return(GenMsgContent.GetInstance(o));

            case TYPE_GEN_REP:
                return(GenRepContent.GetInstance(o));

            case TYPE_ERROR:
                return(ErrorMsgContent.GetInstance(o));

            case TYPE_CERT_CONFIRM:
                return(CertConfirmContent.GetInstance(o));

            case TYPE_POLL_REQ:
                return(PollReqContent.GetInstance(o));

            case TYPE_POLL_REP:
                return(PollRepContent.GetInstance(o));

            default:
                throw new ArgumentException("unknown tag number: " + type, "type");
            }
        }
예제 #6
0
        private static Asn1Encodable GetBodyForType(int type, Asn1Encodable o)
        {
            //IL_014b: Unknown result type (might be due to invalid IL or missing references)
            switch (type)
            {
            case 0:
                return(CertReqMessages.GetInstance(o));

            case 1:
                return(CertRepMessage.GetInstance(o));

            case 2:
                return(CertReqMessages.GetInstance(o));

            case 3:
                return(CertRepMessage.GetInstance(o));

            case 4:
                return(CertificationRequest.GetInstance(o));

            case 5:
                return(PopoDecKeyChallContent.GetInstance(o));

            case 6:
                return(PopoDecKeyRespContent.GetInstance(o));

            case 7:
                return(CertReqMessages.GetInstance(o));

            case 8:
                return(CertRepMessage.GetInstance(o));

            case 9:
                return(CertReqMessages.GetInstance(o));

            case 10:
                return(KeyRecRepContent.GetInstance(o));

            case 11:
                return(RevReqContent.GetInstance(o));

            case 12:
                return(RevRepContent.GetInstance(o));

            case 13:
                return(CertReqMessages.GetInstance(o));

            case 14:
                return(CertRepMessage.GetInstance(o));

            case 15:
                return(CAKeyUpdAnnContent.GetInstance(o));

            case 16:
                return(CmpCertificate.GetInstance(o));

            case 17:
                return(RevAnnContent.GetInstance(o));

            case 18:
                return(CrlAnnContent.GetInstance(o));

            case 19:
                return(PkiConfirmContent.GetInstance(o));

            case 20:
                return(PkiMessages.GetInstance(o));

            case 21:
                return(GenMsgContent.GetInstance(o));

            case 22:
                return(GenRepContent.GetInstance(o));

            case 23:
                return(ErrorMsgContent.GetInstance(o));

            case 24:
                return(CertConfirmContent.GetInstance(o));

            case 25:
                return(PollReqContent.GetInstance(o));

            case 26:
                return(PollRepContent.GetInstance(o));

            default:
                throw new ArgumentException(string.Concat((object)"unknown tag number: ", (object)type), "type");
            }
        }
예제 #7
0
        private static Asn1Encodable GetBodyForType(int type, Asn1Encodable o)
        {
            switch (type)
            {
            case 0:
                return(CertReqMessages.GetInstance(o));

            case 1:
                return(CertRepMessage.GetInstance(o));

            case 2:
                return(CertReqMessages.GetInstance(o));

            case 3:
                return(CertRepMessage.GetInstance(o));

            case 4:
                return(CertificationRequest.GetInstance(o));

            case 5:
                return(PopoDecKeyChallContent.GetInstance(o));

            case 6:
                return(PopoDecKeyRespContent.GetInstance(o));

            case 7:
                return(CertReqMessages.GetInstance(o));

            case 8:
                return(CertRepMessage.GetInstance(o));

            case 9:
                return(CertReqMessages.GetInstance(o));

            case 10:
                return(KeyRecRepContent.GetInstance(o));

            case 11:
                return(RevReqContent.GetInstance(o));

            case 12:
                return(RevRepContent.GetInstance(o));

            case 13:
                return(CertReqMessages.GetInstance(o));

            case 14:
                return(CertRepMessage.GetInstance(o));

            case 15:
                return(CAKeyUpdAnnContent.GetInstance(o));

            case 16:
                return(CmpCertificate.GetInstance(o));

            case 17:
                return(RevAnnContent.GetInstance(o));

            case 18:
                return(CrlAnnContent.GetInstance(o));

            case 19:
                return(PkiConfirmContent.GetInstance(o));

            case 20:
                return(PkiMessages.GetInstance(o));

            case 21:
                return(GenMsgContent.GetInstance(o));

            case 22:
                return(GenRepContent.GetInstance(o));

            case 23:
                return(ErrorMsgContent.GetInstance(o));

            case 24:
                return(CertConfirmContent.GetInstance(o));

            case 25:
                return(PollReqContent.GetInstance(o));

            case 26:
                return(PollRepContent.GetInstance(o));

            default:
                throw new ArgumentException("unknown tag number: " + type, "type");
            }
        }