cmpasn1.js 8.1 KB

1
  1. (function(){function e(c){var a=c.asn1,b=c.cmpasn1=c.cmpasn1||{};c.cmp=c.cmp||{};c.cmp.asn1=b;b.PKIMessage={name:"PKIMessage",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PKIMessage.PKIHeader",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"header"},{name:"PKIMessage.PKIBody",tagClass:a.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"body"},{name:"PKIMessage.PKIProtection",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"protection"},{name:"PKIMessage.Certificates",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"extraCerts"}]};b.PKIHeader={name:"PKIHeader",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PKIHeader.Version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"pvno"},{name:"PKIHeader.Sender",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,captureAsn1:"sender"},{name:"PKIHeader.Recipient",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,captureAsn1:"recipient"},{name:"PKIHeader.MessageTime",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"messageTime"},{name:"PKIHeader.ProtectionAlg",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,captureAsn1:"protectionAlg"},{name:"PKIHeader.SenderKID",tagClass:a.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,captureAsn1:"senderKID"},{name:"PKIHeader.RecipKID",tagClass:a.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,optional:!0,captureAsn1:"recipKID"},{name:"PKIHeader.TransactionID",tagClass:a.Class.CONTEXT_SPECIFIC,type:4,constructed:!0,optional:!0,captureAsn1:"transactionID"},{name:"PKIHeader.SenderNonce",tagClass:a.Class.CONTEXT_SPECIFIC,type:5,constructed:!0,optional:!0,captureAsn1:"senderNonce"},{name:"PKIHeader.RecipNonce",tagClass:a.Class.CONTEXT_SPECIFIC,type:6,constructed:!0,optional:!0,captureAsn1:"recipNonce"},{name:"PKIHeader.FreeText",tagClass:a.Class.CONTEXT_SPECIFIC,type:7,constructed:!0,optional:!0,captureAsn1:"freeText"},{name:"PKIHeader.GeneralInfo",tagClass:a.Class.CONTEXT_SPECIFIC,type:8,constructed:!0,optional:!0,captureAsn1:"generalInfo"}]};b.PKIBody={name:"PKIBody",tagClass:a.Class.CONTEXT_SPECIFIC,type:[],constructed:!0,value:[{name:"PKIBody.CertReqMessage",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"CertReqMessage"},{name:"PKIBody.CertRepMessage",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"CertRepMessage"},{name:"PKIBody.PKIConfirmContent",tagClass:a.Class.UNIVERSAL,type:a.Type.NULL,constructed:!1,optional:!0,capture:"PKIConfirmContent"},{name:"PKIBody.GenMsgContent",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"GenMsgContent"},{name:"PKIBody.GenRepContent",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"GenRepContent"}]};b.PKIBodyType={ir:0,ip:1,cr:2,cp:3,p10cr:4,popdecc:5,popdecr:6,kur:7,kup:8,krr:9,krp:10,rr:11,rp:12,ccr:13,ccp:14,ckuann:15,cann:16,rann:17,crlann:18,conf:19,nested:20,genm:21,genp:22,error:23};b.PKIProtection={name:"PKIProtection",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1};b.CertRepMessage={name:"CertRepMsg",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"CertRepMsg.CaPubs",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,captureAsn1:"caPubs"},{name:"CertRepMsg.Response",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,captureAsn1:"response"}]};b.CertResponse={name:"CertResponse",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,value:[{name:"CertResponse.CertReqId",tagClass:a.Class.UNIVERSAL,type:a.Type.Integer,constructed:!1,optional:!1,capture:"certReqId"},{name:"CertResponse.PKIStatusInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,captureAsn1:"status"},{name:"CertResponse.CertifiedKeyPair",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"certifiedKeyPair"},{name:"CertResponse.RspInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!0,optional:!0,captureAsn1:"rspInfo"}]};b.CertifiedKeyPair={name:"CertifiedKeyPair",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,value:[{name:"CertifiedKeyPair.Certificate",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificate"},{name:"CertifiedKeyPair.EncryptedCert",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,captureAsn1:"EncryptedCert"},{name:"CertifiedKeyPair.PrivateKey",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"privateKey"},{name:"CertifiedKeyPair.PublicationInfo",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,captureAsn1:"publicationInfo"}]};b.GenRepContent={name:"GenRepContent",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[g]};var g={name:"InfoTypeAndValue",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"InfoTypeAndValue.InfoType",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!0,capture:"infoType"},{name:"CertResponse.InfoValue",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"infoValue"}]};b.EncryptedValue={name:"EncryptedValue",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,value:[{name:"EncryptedValue.IntendedAlg",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"intendedAlg"},{name:"EncryptedValue.SymmAlg",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,captureAsn1:"symmAlg"},{name:"EncryptedValue.EncSymmKey",tagClass:a.Class.CONTEXT_SPECIFIC,type:2,constructed:!1,optional:!0,capture:"encSymmKey"},{name:"EncryptedValue.KeyAlg",tagClass:a.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,optional:!0,captureAsn1:"keyAlg"},{name:"EncryptedValue.ValueHint",tagClass:a.Class.CONTEXT_SPECIFIC,type:4,constructed:!0,optional:!0,captureAsn1:"valueHint"},{name:"EncryptedValue.EncValue",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,optional:!1,capture:"encValue"}]};b.ErrorMsgContent={name:"ErrorMsgContent",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,value:[{name:"ErrorMsgContent.PKIStatusInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,captureAsn1:"status"},{name:"ErrorMsgContent.ErrorCode",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!0,capture:"errorCode"},{name:"ErrorMsgContent.ErrorDetails",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,capture:"errorDetails"}]};b.PKIStatusInfo={name:"PKIStatusInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,value:[{name:"PKIStatusInfo.PKIStatus",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!1,capture:"status"},{name:"PKIStatusInfo.PKIFreeText",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"statusString"},{name:"PKIStatusInfo.PKIFailureInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,optional:!0,capture:"failInfo"}]};b.RevRepContent={name:"RevRepContent",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,value:[{name:"RevRepContent.PKIStatusInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!1,captureAsn1:"status"},{name:"RevRepContent.CertId",tagClass:a.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"revCerts"},{name:"RevRepContent.CRLs",tagClass:a.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,captureAsn1:"crls"}]}}var f=["./asn1","./util"],d=null;"function"!==typeof define&&("object"===typeof module&&module.exports?d=function(c,a){a(require,module)}:(crosscert=window.crosscert=window.crosscert||{},e(crosscert)));(d||"function"===typeof define)&&(d||define)(["require","module"].concat(f),function(c,a){a.exports=function(a){var b=f.map(function(a){return c(a)}).concat(e);a=a||{};a.defined=a.defined||{};if(a.defined.pkcs7asn1)return a.pkcs7asn1;a.defined.pkcs7asn1=!0;for(var d=0;d<b.length;++d)b[d](a);return a.pkcs7asn1}})})();