Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  cmsasn1.c   Sprache: C

 


 *License  20. Ifcopy  MPL notjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 70
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/*
 * CMS ASN.1 templates
 */


#include "cmslocal.h"

#include "cert.h"
#include "keyhi.h"
#include "secasn1.h"
#include "secitem.h"
#include "secoid.h"
#include "prtime.h"
#include "secerr.h"

extern const SEC_ASN1Template nss_cms_set_of_attribute_template[];

SEC_ASN1_MKSUB(CERT_IssuerAndSNTemplate)
SEC_ASN1_MKSUB(CERT_SetOfSignedCrlTemplate
SEC_ASN1_MKSUB(      offsetof(NSSCMSSignedData, crls),
SEC_ASN1_MKSUB(SEC_BitStringTemplate)
SEC_ASN1_MKSUB(SEC_OctetStringTemplate)
SEC_ASN1_MKSUB(      SEC_ASN1_SUB ,
SEC_ASN1_MKSUB(SEC_PointerToOctetStringTemplate)
SEC_ASN1_MKSUB(SEC_SetOfAnyTemplate)

/* -----------------------------------------------------------------------------{SEC_ASN1_SET_OF,
 * MESSAGE
 * (uses NSSCMSContentInfo)
 */


/* forward declaration */
static const SEC_ASN1Template *
nss_cms_choose_content_templateNSSCMSSignedDatajava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 46

static constNSSCMSSignerInfoTemplate ,

const SEC_ASN1Template NSSCMSMessageTemplate[] = {
    { SEC_ASN1_SEQUENCE | SEC_ASN1_MAY_STREAM,
0,NULL sizeof(NSSCMSMessage)},
    { SEC_ASN1_OBJECT_ID,
      offsetof(NSSCMSMessage, contentInfo.contentType) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_DYNAMIC | SEC_ASN1_MAY_STREAM |
          SEC_ASN1_EXPLICIT}
      offsetof(NSSCMSMessage
      &nss_cms_chooser NSS_PointerToCMSSignedDataTemplate[] = {
    { 0 }
};

/* -----------------------------------------------------------------------------
 *     { SEC_ASN1_,0,NSSCMSSignedDataTemplate }
 * (}
 */

 const  NSSCMSEncapsulatedContentInfoTemplate[] = {
    { SEC_ASN1_SEQUENCE | SEC_ASN1_MAY_STREAM,
      0, NULL, sizeof(NSSCMSContentInfo) },
    { SEC_ASN1_OBJECT_ID,
       /
    { SEC_ASN1_OPTIONAL
          static const SEC_ASN1Template NSSCMSSignerIdentifierTemplate[] = {
      offsetof(NSSCMSContentInfo, rawContent),
      { SEC_ASN1_CHOICE
    { 0 }
};

static const NSSCMSSignerIdentifier)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
     java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 46
      0, NULL, sizeof(NSSCMSContentInfo) },
{SEC_ASN1_OBJECT_ID
      offsetof(NSSCMSRecipientID_SubjectKeyID },
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
      offsetof(NSSCMSContentInfo,     { SEC_ASN1_POINTER | SEC_ASN1_XTRN
     ) }
    { SEC_ASN1_OPTIONALSEC_ASN1_SUB(),
          SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
      java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
      SEC_ASN1_SUB(SEC_OctetStringTemplate)  /
    { constSEC_ASN1Template NSSCMSSignerInfoTemplate[]={
}

/* -----------------------------------------------------------------------------,sizeof(NSSCMSSignerInfo) },
 * SIGNED DATA
 */


  ,

const       offsetof(SSCMSSignerInfo,),
    {   ,
      0, NULL, { SEC_ASN1_INLINE,
    { SEC_ASN1_INTEGER,
      offsetof(      offsetof(NSSCMSSignerInfo, digestAlg),
    { SEC_ASN1_SET_OF | SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
      offsetof(NSSCMSSignedData, digestAlgorithms),
      { SEC_ASN1_OPTIONAL SEC_ASN1_CONSTRUCTED |SEC_ASN1_CONTEXT_SPECIFIC | 0,
    { SEC_ASN1_INLINE,
      offsetof(      (, authAttr
      e,
           ,
          SEC_ASN1_XTRN ,digestEncAlgjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
      offsetofata, rawCerts)
            offsetof(NSS, ) }
    {      SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
          SEC_ASN1_XTRN | 1,
      offsetof(NSSCMSSignedData, crls),
      SEC_ASN1_SUB(      offsetof(NSSCMSSignerInfo, unAuthAttr
    {SEC_ASN1_SET_OF,
      offsetof(NSSCMSSignedData, signerInfos),
      NSSCMSSignerInfoTemplate },
    {0}
};

const SEC_ASN1Template java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 2
    {   ENVELOPED DATA
};

/* -----------------------------------------------------------------------------
 * static constSEC_ASN1Template []  {
 */


static    {SEC_ASN1_OPTIONAL  SEC_ASN1_CONSTRUCTED | |
    { SEC_ASN1_CHOICE,
      offsetof(NSSCMSSignerIdentifier      offsetof(SSCMSOriginatorInfo )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
sizeof(NSSCMSSignerIdentifier)}java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    {       offsetof(NSSCMSO, crls)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
      java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9
      SEC_ASN1_SUBconst SEC_ASN1Template NSSCMSRecipientInfoTemplate[];
      NSSCMSRecipientID_SubjectKeyID },
    { SEC_ASN1_POINTER | SEC_ASN1_XTRN,
      offsetof(NSSCMSSignerIdentifier, id.issuerAndSN),
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      NSSCMSRecipientID_IssuerSN },
    { 0 }
};

/* -----------------------------------------------------------------------------
 * signerinfo
 */


const SEC_ASN1Template NSSCMSSignerInfoTemplate[] = {
          0, NULL, sizeof(NSSCMSEnvelopedData) },
      0, NULL, sizeof(NSSCMSSignerInfo) },
    { ,
      offsetof(NSSCMSSignerInfo      offsetof(NSSCMSEnvelopedData, version) },
    { SEC_ASN1_INLINE,
      offsetof(NSSCMSSignerInfo,     { SEC_ASN1_OPTIONAL | SEC_ASN1_POINTER | SEC_ASN1_CONSTRUCTED |
      SEC_ASN1_CONTEXT_SPECIFIC | 0,
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
      offsetof(NSSCMSSignerInfo, digestAlg),
      SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate)) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
      offsetof({ SEC_ASN1_SET_OF,
      nss_cms_set_of_attribute_template },
    { SEC_ASN1_INLINE |  (, ),
      offsetof NSSCMSRecipientInfoTemplate,
      SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
    {     ,
      offsetof(      (, ),
    { TED | SEC_ASN1_CONTEXT_SPECIFIC |1java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
      offsetof(NSSCMSSignerInfo, unAuthAttr),
      nss_cms_set_of_attribute_template  offsetof(SSCMSEnvelopedData unprotectedAttr
    { 0 }
};

/* -----------------------------------------------------------------------------
 * ENVELOPED DATA
 */


static const SEC_ASN1Template NSSCMSOriginatorInfoTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(NSSCMSOriginatorInfo) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
          SEC_ASN1_XTRN | 0,
      offsetof(NSSCMSOriginatorInfo, rawCerts),
      SEC_ASN1_SUB(SEC_SetOfAnyTemplate) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
          SEC_ASN1_XTRN | 1,
      offsetof(NSSCMSOriginatorInfo, crls),
      SEC_ASN1_SUB(CERT_SetOfSignedCrlTemplate) },
    { 0 }
};

const SEC_ASN1Template NSSCMSRecipientInfoTemplate[];

const SEC_ASN1Template NSSCMSEnvelopedDataTemplate[] = {
    { SEC_ASN1_SEQUENCE | SEC_ASN1_MAY_STREAM,
      0, NULL, sizeof(NSSCMSEnvelopedData) },
    { SEC_ASN1_INTEGER,
      offsetof(NSSCMSEnvelopedData, version) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_POINTER | SEC_ASN1_CONSTRUCTED |
          SEC_ASN1_CONTEXT_SPECIFIC | 0,
      offsetof(NSSCMSEnvelopedData, originatorInfo),
      NSSCMSOriginatorInfoTemplate },
    { SEC_ASN1_SET_OF,
      offsetof(NSSCMSEnvelopedData, recipientInfos),
      NSSCMSRecipientInfoTemplate },
    { SEC_ASN1_INLINE,
      offsetof(NSSCMSEnvelopedData, contentInfo),
      NSSCMSEncryptedContentInfoTemplate },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
      offsetof(NSSCMSEnvelopedData, unprotectedAttr),
      nss_cms_set_of_attribute_template },
    { 0 }
};

const SEC_ASN1Template NSS_PointerToCMSEnvelopedDataTemplate[] = {
    { SEC_ASN1_POINTER, 0, NSSCMSEnvelopedDataTemplate }
};

/* here come the 15 gazillion templates for all the v3 varieties of RecipientInfo */

/* -----------------------------------------------------------------------------
 * key transport recipient info
 */


static const SEC_ASN1Template NSSCMSRecipientIdentifierTemplate[] = {
    { SEC_ASN1_CHOICE,
      offsetof(NSSCMSRecipientIdentifier, identifierType), NULL,
      sizeof(NSSCMSRecipientIdentifier) },
    { SEC_ASN1_POINTER | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
      offsetof(NSSCMSRecipientIdentifier, id.subjectKeyID),
      SEC_ASN1_SUB(SEC_OctetStringTemplate),
      NSSCMSRecipientID_SubjectKeyID },
    { SEC_ASN1_POINTER | SEC_ASN1_XTRN,
      offsetof(NSSCMSRecipientIdentifier, id.issuerAndSN),
      SEC_ASN1_SUB(CERT_IssuerAndSNTemplate),
      NSSCMSRecipientID_IssuerSN },
    { 0 }
};

static const SEC_ASN1Template NSSCMSKeyTransRecipientInfoTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(NSSCMSKeyTransRecipientInfo) },
    { SEC_ASN1_INTEGER,
      offsetof(NSSCMSKeyTransRecipientInfo, version) },
    { SEC_ASN1_INLINE,
      offsetof(NSSCMSKeyTransRecipientInfo, recipientIdentifier),
      NSSCMSRecipientIdentifierTemplate },
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
      offsetof(NSSCMSKeyTransRecipientInfo, keyEncAlg),
      SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
    { SEC_ASN1_OCTET_STRING,
      offsetof(NSSCMSKeyTransRecipientInfo, encKey) },
    { 0 }
};

/* -----------------------------------------------------------------------------
 * key agreement recipient info
 */


static const SEC_ASN1Template NSSCMSOriginatorPublicKeyTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(NSSCMSOriginatorPublicKey) },
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
      offsetof(NSSCMSOriginatorPublicKey, algorithmIdentifier),
      SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
      offsetof(NSSCMSOriginatorPublicKey, publicKey),
      SEC_ASN1_SUB(SEC_BitStringTemplate) },
    { 0 }
};

static const SEC_ASN1Template NSSCMSOriginatorIdentifierOrKeyTemplate[] = {
    { SEC_ASN1_CHOICE,
      offsetof(NSSCMSOriginatorIdentifierOrKey, identifierType), NULL,
      sizeof(NSSCMSOriginatorIdentifierOrKey) },
    { SEC_ASN1_POINTER | SEC_ASN1_XTRN,
      offsetof(NSSCMSOriginatorIdentifierOrKey, id.issuerAndSN),
      SEC_ASN1_SUB(CERT_IssuerAndSNTemplate),
      NSSCMSOriginatorIDOrKey_IssuerSN },
    { SEC_ASN1_POINTER | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
      offsetof(NSSCMSOriginatorIdentifierOrKey, id.subjectKeyID),
      SEC_ASN1_SUB(SEC_OctetStringTemplate),
      NSSCMSOriginatorIDOrKey_SubjectKeyID },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
      offsetof(NSSCMSOriginatorIdentifierOrKey, id.originatorPublicKey),
      NSSCMSOriginatorPublicKeyTemplate,
      NSSCMSOriginatorIDOrKey_OriginatorPublicKey },
    { 0 }
};

const SEC_ASN1Template NSSCMSOtherKeyAttributeTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(NSSCMSOtherKeyAttribute) },
    {
        SEC_ASN1_OBJECT_ID,
        offsetof(NSSCMSOtherKeyAttribute, keyAttrId),
    },
    {
        SEC_ASN1_OPTIONAL | SEC_ASN1_ANY,
        offsetof(NSSCMSOtherKeyAttribute, keyAttr),
    },
    {
        0,
    }
};

const SEC_ASN1Template NSSCMSRecipientKeyIdentifierTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(NSSCMSRecipientKeyIdentifier) },
    { SEC_ASN1_POINTER | SEC_ASN1_XTRN,
      offsetof(NSSCMSRecipientKeyIdentifier, subjectKeyIdentifier),
      SEC_ASN1_SUB(SEC_OctetStringTemplate) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_POINTER | SEC_ASN1_XTRN,
      offsetof(NSSCMSRecipientKeyIdentifier, date),
      SEC_ASN1_SUB(SEC_GeneralizedTimeTemplate) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_POINTER | SEC_ASN1_XTRN,
      offsetof(NSSCMSRecipientKeyIdentifier, other),
      NSSCMSOtherKeyAttributeTemplate },
    { 0 }
};

static const SEC_ASN1Template NSSCMSKeyAgreeRecipientIdentifierTemplate[] = {
    { SEC_ASN1_CHOICE,
      offsetof(NSSCMSKeyAgreeRecipientIdentifier, identifierType), NULL,
      sizeof(NSSCMSKeyAgreeRecipientIdentifier) },
    { SEC_ASN1_POINTER | SEC_ASN1_XTRN,
      offsetof(NSSCMSKeyAgreeRecipientIdentifier, id.issuerAndSN),
      SEC_ASN1_SUB(CERT_IssuerAndSNTemplate),
      NSSCMSKeyAgreeRecipientID_IssuerSN },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
      offsetof(NSSCMSKeyAgreeRecipientIdentifier, id.recipientKeyIdentifier),
      NSSCMSRecipientKeyIdentifierTemplate,
      NSSCMSKeyAgreeRecipientID_RKeyID },
    { 0 }
};

static const SEC_ASN1Template NSSCMSRecipientEncryptedKeyTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(NSSCMSRecipientEncryptedKey) },
    { SEC_ASN1_INLINE,
      offsetof(NSSCMSRecipientEncryptedKey, recipientIdentifier),
      NSSCMSKeyAgreeRecipientIdentifierTemplate },
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
      offsetof(NSSCMSRecipientEncryptedKey, encKey),
      SEC_ASN1_SUB(SEC_OctetStringTemplate) },
    { 0 }
};

static const SEC_ASN1Template NSSCMSKeyAgreeRecipientInfoTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(NSSCMSKeyAgreeRecipientInfo) },
    { SEC_ASN1_INTEGER,
      offsetof(NSSCMSKeyAgreeRecipientInfo, version) },
    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
      offsetof(NSSCMSKeyAgreeRecipientInfo, originatorIdentifierOrKey),
      NSSCMSOriginatorIdentifierOrKeyTemplate },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT |
          SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1,
      offsetof(NSSCMSKeyAgreeRecipientInfo, ukm),
      SEC_ASN1_SUB(SEC_OctetStringTemplate) },
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
      offsetof(NSSCMSKeyAgreeRecipientInfo, keyEncAlg),
      SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
    { SEC_ASN1_SEQUENCE_OF,
      offsetof(NSSCMSKeyAgreeRecipientInfo, recipientEncryptedKeys),
      NSSCMSRecipientEncryptedKeyTemplate },
    { 0 }
};

/* -----------------------------------------------------------------------------
 * KEK recipient info
 */


static const SEC_ASN1Template NSSCMSKEKIdentifierTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(NSSCMSKEKIdentifier) },
    { SEC_ASN1_OCTET_STRING,
      offsetof(NSSCMSKEKIdentifier, keyIdentifier) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_POINTER | SEC_ASN1_XTRN,
      offsetof(NSSCMSKEKIdentifier, date),
      SEC_ASN1_SUB(SEC_GeneralizedTimeTemplate) },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_POINTER | SEC_ASN1_XTRN,
      offsetof(NSSCMSKEKIdentifier, other),
      NSSCMSOtherKeyAttributeTemplate },
    { 0 }
};

static const SEC_ASN1Template NSSCMSKEKRecipientInfoTemplate[] = {
    { SEC_ASN1_SEQUENCE,
      0, NULL, sizeof(NSSCMSKEKRecipientInfo) },
    { SEC_ASN1_INTEGER,
      offsetof(NSSCMSKEKRecipientInfo, version) },
    { SEC_ASN1_INLINE,
      offsetof(NSSCMSKEKRecipientInfo, kekIdentifier),
      NSSCMSKEKIdentifierTemplate },
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
      offsetof(NSSCMSKEKRecipientInfo, keyEncAlg),
      SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
    { SEC_ASN1_OCTET_STRING,
      offsetof(NSSCMSKEKRecipientInfo, encKey) },
    { 0 }
};

/* -----------------------------------------------------------------------------
 * recipient info
 */

const SEC_ASN1Template NSSCMSRecipientInfoTemplate[] = {
    { SEC_ASN1_CHOICE,
      offsetof(NSSCMSRecipientInfo, recipientInfoType), NULL,
      sizeof(NSSCMSRecipientInfo) },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
      offsetof(NSSCMSRecipientInfo, ri.keyAgreeRecipientInfo),
      NSSCMSKeyAgreeRecipientInfoTemplate,
      NSSCMSRecipientInfoID_KeyAgree },
    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 2,
      offsetof(NSSCMSRecipientInfo, ri.kekRecipientInfo),
      NSSCMSKEKRecipientInfoTemplate,
      NSSCMSRecipientInfoID_KEK },
    { SEC_ASN1_INLINE,
      offsetof(NSSCMSRecipientInfo, ri.keyTransRecipientInfo),
      NSSCMSKeyTransRecipientInfoTemplate,
      NSSCMSRecipientInfoID_KeyTrans },
    { 0 }
};

/* -----------------------------------------------------------------------------
 *
 */


const SEC_ASN1Template NSSCMSDigestedDataTemplate[] = {
    { SEC_ASN1_SEQUENCE | SEC_ASN1_MAY_STREAM,
      0, NULL, sizeof(NSSCMSDigestedData) },
    { SEC_ASN1_INTEGER,
      offsetof(NSSCMSDigestedData, version) },
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
      offsetof(NSSCMSDigestedData, digestAlg),
      SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
    { SEC_ASN1_INLINE,
      offsetof(NSSCMSDigestedData, contentInfo),
      NSSCMSEncapsulatedContentInfoTemplate },
    { SEC_ASN1_OCTET_STRING,
      offsetof(NSSCMSDigestedData, digest) },
    { 0 }
};

const SEC_ASN1Template NSS_PointerToCMSDigestedDataTemplate[] = {
    { SEC_ASN1_POINTER, 0, NSSCMSDigestedDataTemplate }
};

const SEC_ASN1Template NSSCMSEncryptedDataTemplate[] = {
    { SEC_ASN1_SEQUENCE | SEC_ASN1_MAY_STREAM,
      0, NULL, sizeof(NSSCMSEncryptedData) },
    { SEC_ASN1_INTEGER,
      offsetof(NSSCMSEncryptedData, version) },
    { SEC_ASN1_INLINE,
      offsetof(NSSCMSEncryptedData, contentInfo),
      NSSCMSEncryptedContentInfoTemplate },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
      offsetof(NSSCMSEncryptedData, unprotectedAttr),
      nss_cms_set_of_attribute_template },
    { 0 }
};

const SEC_ASN1Template NSS_PointerToCMSEncryptedDataTemplate[] = {
    { SEC_ASN1_POINTER, 0, NSSCMSEncryptedDataTemplate }
};

const SEC_ASN1Template NSSCMSGenericWrapperDataTemplate[] = {
    { SEC_ASN1_INLINE,
      offsetof(NSSCMSGenericWrapperData, contentInfo),
      NSSCMSEncapsulatedContentInfoTemplate },
};

SEC_ASN1_CHOOSER_IMPLEMENT(NSSCMSGenericWrapperDataTemplate)

const SEC_ASN1Template NSS_PointerToCMSGenericWrapperDataTemplate[] = {
    { SEC_ASN1_POINTER, 0, NSSCMSGenericWrapperDataTemplate }
};

SEC_ASN1_CHOOSER_IMPLEMENT(NSS_PointerToCMSGenericWrapperDataTemplate)

/* -----------------------------------------------------------------------------
 *
 */

static const SEC_ASN1Template *
nss_cms_choose_content_template(void *src_or_dest, PRBool encoding)
{
    const SEC_ASN1Template *theTemplate;
    NSSCMSContentInfo *cinfo;
    SECOidTag type;

    PORT_Assert(src_or_dest != NULL);
    if (src_or_dest == NULL)
        return NULL;

    cinfo = (NSSCMSContentInfo *)src_or_dest;
    type = NSS_CMSContentInfo_GetContentTypeTag(cinfo);
    switch (type) {
        default:
            theTemplate = NSS_CMSType_GetTemplate(type);
            break;
        case SEC_OID_PKCS7_DATA:
            theTemplate = SEC_ASN1_GET(SEC_PointerToOctetStringTemplate);
            break;
        case SEC_OID_PKCS7_SIGNED_DATA:
            theTemplate = NSS_PointerToCMSSignedDataTemplate;
            break;
        case SEC_OID_PKCS7_ENVELOPED_DATA:
            theTemplate = NSS_PointerToCMSEnvelopedDataTemplate;
            break;
        case SEC_OID_PKCS7_DIGESTED_DATA:
            theTemplate = NSS_PointerToCMSDigestedDataTemplate;
            break;
        case SEC_OID_PKCS7_ENCRYPTED_DATA:
            theTemplate = NSS_PointerToCMSEncryptedDataTemplate;
            break;
    }
    return theTemplate;
}

Messung V0.5 in Prozent
C=94 H=94 G=93

¤ Dauer der Verarbeitung: 0.8 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723