pkcs7-template.h revision 13493ab7596e827b8d0caab2c89e635dd65f78f9
/* $Id$ */
/** @file
* IPRT - Crypto - PKCS \#7, Core APIs, Code Generator Template.
*/
/*
* Copyright (C) 2006-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
#define RTASN1TMPL_DECL RTDECL
/*
* One PCKS #7 IssuerAndSerialNumber.
*/
/*
* One PCKS #7 Attribute.
*/
#define RTASN1TMPL_TYPE RTCRPKCS7ATTRIBUTE
RTASN1TMPL_MEMBER_DYN( uValues, pOctetStrings, RTASN1SETOFOCTETSTRINGS, RTAsn1SetOfOctetStrings, Allocation,
enmType, RTCRPKCS7ATTRIBUTETYPE_OCTET_STRINGS, RTAsn1ObjId_CompareWithString(&pThis->Type, RTCR_PKCS9_ID_MESSAGE_DIGEST_OID) == 0);
enmType, RTCRPKCS7ATTRIBUTETYPE_OBJ_IDS, RTAsn1ObjId_CompareWithString(&pThis->Type, RTCR_PKCS9_ID_CONTENT_TYPE_OID) == 0);
/*
* Set of PCKS #7 Attributes.
*/
#define RTASN1TMPL_TYPE RTCRPKCS7ATTRIBUTES
/*
* One PCKS #7 SignerInfo.
*/
#define RTASN1TMPL_TYPE RTCRPKCS7SIGNERINFO
RTASN1TMPL_MEMBER( IssuerAndSerialNumber, RTCRPKCS7ISSUERANDSERIALNUMBER, RTCrPkcs7IssuerAndSerialNumber);
RTASN1TMPL_MEMBER( DigestEncryptionAlgorithm, RTCRX509ALGORITHMIDENTIFIER, RTCrX509AlgorithmIdentifier);
RTASN1TMPL_MEMBER_OPT_ITAG( UnauthenticatedAttributes, RTCRPKCS7ATTRIBUTES, RTCrPkcs7Attributes, 1);
/*
* Set of PCKS #7 SignerInfos.
*/
#define RTASN1TMPL_TYPE RTCRPKCS7SIGNERINFOS
/*
* PCKS #7 SignedData.
*/
#define RTASN1TMPL_TYPE RTCRPKCS7SIGNEDDATA
RTASN1TMPL_EXEC_CHECK_SANITY( rc = rtCrPkcs7SignedData_CheckSanityExtra(pThis, fFlags, pErrInfo, pszErrorTag) ) /* no ; */
/*
* PCKS #7 DigestInfo.
*/
#define RTASN1TMPL_TYPE RTCRPKCS7DIGESTINFO
/*
* PCKS #7 ContentInfo.
*/
#define RTASN1TMPL_TYPE RTCRPKCS7CONTENTINFO
RTASN1TMPL_EXEC_DECODE( rc = rtCrPkcs7ContentInfo_DecodeExtra(pCursor, fFlags, pThis, pszErrorTag)) /* no ; */