Org.BouncyCastle.Asn1.Cmp.PkiBody.GetBodyForType C# (CSharp) Méthode

GetBodyForType() private static méthode

private static GetBodyForType ( int type, Asn1Encodable o ) : Asn1Encodable
type int
o Asn1Encodable
Résultat Asn1Encodable
        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");
            }
        }

Usage Example

Exemple #1
0
 private PkiBody(Asn1TaggedObject tagged)
 {
     this.tagNo = tagged.TagNo;
     this.body  = PkiBody.GetBodyForType(this.tagNo, tagged.GetObject());
 }
All Usage Examples Of Org.BouncyCastle.Asn1.Cmp.PkiBody::GetBodyForType