VirtualBox

Changeset 52503 in vbox


Ignore:
Timestamp:
Aug 26, 2014 2:43:04 PM (10 years ago)
Author:
vboxsync
Message:

Started working on PKCS #7 attributes.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/crypto/pkcs7.h

    r51770 r52503  
    5959
    6060
     61/** Pointer to the IPRT representation of a PKCS \#7 SignerInfo. */
     62typedef struct RTCRPKCS7SIGNERINFO *PRTCRPKCS7SIGNERINFO;
     63/** Pointer to the const IPRT representation of a PKCS \#7 SignerInfo. */
     64typedef struct RTCRPKCS7SIGNERINFO const *PCRTCRPKCS7SIGNERINFO;
     65RTASN1_IMPL_GEN_SET_OF_TYPEDEFS_AND_PROTOS(RTCRPKCS7SIGNERINFOS, RTCRPKCS7SIGNERINFO, RTDECL, RTCrPkcs7SignerInfos);
     66
     67
    6168/**
    6269 * Attribute value type (for the union).
     
    6875    /** Not present, union is NULL. */
    6976    RTCRPKCS7ATTRIBUTETYPE_NOT_PRESENT,
    70     /** Unknown values, Asn1Core. */
     77    /** Unknown values, pCores. */
    7178    RTCRPKCS7ATTRIBUTETYPE_UNKNOWN,
    72     /** Object IDs, use ObjId. */
     79    /** Object IDs, use pObjIds. */
    7380    RTCRPKCS7ATTRIBUTETYPE_OBJ_IDS,
    74     /** Octet strings. */
     81    /** Octet strings, use pOctetStrings. */
    7582    RTCRPKCS7ATTRIBUTETYPE_OCTET_STRINGS,
     83    /** Counter signatures (PKCS \#9), use pCounterSignatures. */
     84    RTCRPKCS7ATTRIBUTETYPE_COUNTER_SIGNATURES,
     85    /** Signing time (PKCS \#9), use pSigningTime. */
     86    RTCRPKCS7ATTRIBUTETYPE_SIGNING_TIME,
    7687    /** Blow the type up to 32-bits. */
    7788    RTCRPKCS7ATTRIBUTETYPE_32BIT_HACK = 0x7fffffff
     
    100111        /** ASN.1 octet strings (RTCRPKCS7ATTRIBUTETYPE_OCTET_STRINGS). */
    101112        PRTASN1SETOFOCTETSTRINGS        pOctetStrings;
     113        /** Counter signatures RTCRPKCS7ATTRIBUTETYPE_COUNTER_SIGNATURES(). */
     114        PRTCRPKCS7SIGNERINFOS           pCounterSignatures;
     115        /** Signing time(s) (RTCRPKCS7ATTRIBUTETYPE_SIGNING_TIME). */
     116        PRTASN1SETOFTIMES               pSigningTime;
    102117    } uValues;
    103118} RTCRPKCS7ATTRIBUTE;
     
    139154    RTCRPKCS7ATTRIBUTES                 UnauthenticatedAttributes;
    140155} RTCRPKCS7SIGNERINFO;
    141 /** Pointer to the IPRT representation of a PKCS \#7 SignerInfo. */
    142 typedef RTCRPKCS7SIGNERINFO *PRTCRPKCS7SIGNERINFO;
    143 /** Pointer to the const IPRT representation of a PKCS \#7 SignerInfo. */
    144 typedef RTCRPKCS7SIGNERINFO const *PCRTCRPKCS7SIGNERINFO;
    145156RTASN1TYPE_STANDARD_PROTOTYPES(RTCRPKCS7SIGNERINFO, RTDECL, RTCrPkcs7SignerInfo, SeqCore.Asn1Core);
    146 RTASN1_IMPL_GEN_SET_OF_TYPEDEFS_AND_PROTOS(RTCRPKCS7SIGNERINFOS, RTCRPKCS7SIGNERINFO, RTDECL, RTCrPkcs7SignerInfos);
    147157
    148158/** RTCRPKCS7SIGNERINFO::Version value.  */
  • trunk/src/VBox/Runtime/common/crypto/pkcs7-template.h

    r51770 r52503  
    5555RTASN1TMPL_MEMBER_DYN(          uValues,    pObjIds,        RTASN1SETOFOBJIDS,          RTAsn1SetOfObjIds,          Allocation,
    5656    enmType, RTCRPKCS7ATTRIBUTETYPE_OBJ_IDS,        RTAsn1ObjId_CompareWithString(&pThis->Type, RTCR_PKCS9_ID_CONTENT_TYPE_OID) == 0);
     57RTASN1TMPL_MEMBER_DYN(          uValues, pCounterSignatures, RTCRPKCS7SINGERINFOS,      RTCrPkcs7SignerInfos,       Allocation,
     58    enmType, RTCRPKCS7ATTRIBUTETYPE_COUNTER_SIGNATURES, RTAsn1ObjId_CompareWithString(&pThis->Type, RTCR_PKCS9_ID_COUNTER_SIGNATURE_OID) == 0);
     59RTASN1TMPL_MEMBER_DYN(          uValues,    pSigningTime,   RTASN1SETOFTIMES,           RTAsn1SetOfTimes,           Allocation,
     60    enmType, RTCRPKCS7ATTRIBUTETYPE_SIGNING_TIME,   RTAsn1ObjId_CompareWithString(&pThis->Type, RTCR_PKCS9_ID_SIGNING_TIME_OID) == 0);
    5761RTASN1TMPL_MEMBER_DYN_DEFAULT(  uValues,    pCores,         RTASN1SETOFCORES,           RTAsn1SetOfCores,           Allocation,
    5862    enmType, RTCRPKCS7ATTRIBUTETYPE_UNKNOWN);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette