VirtualBox

source: vbox/trunk/src/VBox/Runtime/common/crypto/taf-template.h@ 57444

Last change on this file since 57444 was 56290, checked in by vboxsync, 10 years ago

IPRT: Updated (C) year.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1/* $Id: taf-template.h 56290 2015-06-09 14:01:31Z vboxsync $ */
2/** @file
3 * IPRT - Crypto - Trust Anchor Format (RFC-5914), Code Generator Template.
4 */
5
6/*
7 * Copyright (C) 2006-2015 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#define RTASN1TMPL_DECL RTDECL
28
29/*
30 * CertPathControls (not sequence-/set-of).
31 */
32#define RTASN1TMPL_TYPE RTCRTAFCERTPATHCONTROLS
33#define RTASN1TMPL_EXT_NAME RTCrTafCertPathControls
34#define RTASN1TMPL_INT_NAME rtCrTafCertPathControls
35RTASN1TMPL_BEGIN_SEQCORE();
36RTASN1TMPL_MEMBER( TaName, RTCRX509NAME, RTCrX509Name);
37RTASN1TMPL_MEMBER_OPT_ITAG( Certificate, RTCRX509CERTIFICATE, RTCrX509Certificate, 0);
38RTASN1TMPL_MEMBER_OPT_ITAG( PolicySet, RTCRX509CERTIFICATEPOLICIES, RTCrX509CertificatePolicies, 1);
39RTASN1TMPL_MEMBER_OPT_ITAG_BITSTRING(PolicyFlags, 3 /* max bits */, 2);
40RTASN1TMPL_MEMBER_OPT_ITAG( NameConstr, RTCRX509NAMECONSTRAINTS, RTCrX509NameConstraints, 3);
41RTASN1TMPL_MEMBER_OPT_ITAG_EX( PathLenConstraint, RTASN1INTEGER, RTAsn1Integer, 4, RTASN1TMPL_ITAG_F_CP, RT_NOTHING);
42RTASN1TMPL_END_SEQCORE();
43#undef RTASN1TMPL_TYPE
44#undef RTASN1TMPL_EXT_NAME
45#undef RTASN1TMPL_INT_NAME
46
47
48/*
49 * TrustAnchorInfo.
50 */
51#define RTASN1TMPL_TYPE RTCRTAFTRUSTANCHORINFO
52#define RTASN1TMPL_EXT_NAME RTCrTafTrustAnchorInfo
53#define RTASN1TMPL_INT_NAME rtCrTafTrustAnchorInfo
54RTASN1TMPL_BEGIN_SEQCORE();
55RTASN1TMPL_MEMBER_DEF_ITAG_UP( Version, RTASN1INTEGER, RTAsn1Integer, ASN1_TAG_INTEGER, RTCRTAFTRUSTANCHORINFO_V1);
56RTASN1TMPL_MEMBER( PubKey, RTCRX509SUBJECTPUBLICKEYINFO, RTCrX509SubjectPublicKeyInfo);
57RTASN1TMPL_MEMBER( KeyIdentifier, RTASN1OCTETSTRING, RTAsn1OctetString);
58RTASN1TMPL_MEMBER_OPT_UTF8_STRING_EX(TaTitle, RTASN1TMPL_MEMBER_CONSTR_MIN_MAX(TaTitleLangTag, RTASN1STRING, RTAsn1String, 1, 64, RT_NOTHING));
59RTASN1TMPL_MEMBER_OPT_ITAG_EX( CertPath, RTCRTAFCERTPATHCONTROLS, RTCrTafCertPathControls, ASN1_TAG_SEQUENCE, RTASN1TMPL_ITAG_F_UC, RT_NOTHING);
60RTASN1TMPL_MEMBER_OPT_XTAG( T1, CtxTag1, Exts, RTCRX509EXTENSIONS, RTCrX509Extensions, 1);
61RTASN1TMPL_MEMBER_OPT_UTF8_STRING_EX(TaTitleLangTag, RTASN1TMPL_MEMBER_CONSTR_MIN_MAX(TaTitleLangTag, RTASN1STRING, RTAsn1String, 2, 4, RT_NOTHING));
62RTASN1TMPL_END_SEQCORE();
63#undef RTASN1TMPL_TYPE
64#undef RTASN1TMPL_EXT_NAME
65#undef RTASN1TMPL_INT_NAME
66
67
68/*
69 * TrustAnchorChoice.
70 */
71#define RTASN1TMPL_TYPE RTCRTAFTRUSTANCHORCHOICE
72#define RTASN1TMPL_EXT_NAME RTCrTafTrustAnchorChoice
73#define RTASN1TMPL_INT_NAME rtCrTafTrustAnchorChoice
74RTASN1TMPL_BEGIN_PCHOICE();
75RTASN1TMPL_PCHOICE_ITAG(ASN1_TAG_SEQUENCE, RTCRTAFTRUSTANCHORCHOICEVAL_CERTIFICATE, u.pCertificate, Certificate, RTCRX509CERTIFICATE, RTCrX509Certificate);
76RTASN1TMPL_PCHOICE_XTAG(1, RTCRTAFTRUSTANCHORCHOICEVAL_TBS_CERTIFICATE, u.pT1, CtxTag1, TbsCert, RTCRX509TBSCERTIFICATE, RTCrX509TbsCertificate);
77RTASN1TMPL_PCHOICE_XTAG(2, RTCRTAFTRUSTANCHORCHOICEVAL_TRUST_ANCHOR_INFO, u.pT2, CtxTag2, TaInfo, RTCRTAFTRUSTANCHORINFO, RTCrTafTrustAnchorInfo);
78RTASN1TMPL_END_PCHOICE();
79#undef RTASN1TMPL_TYPE
80#undef RTASN1TMPL_EXT_NAME
81#undef RTASN1TMPL_INT_NAME
82
83
84/*
85 * TrustAnchorList
86 */
87#define RTASN1TMPL_TYPE RTCRTAFTRUSTANCHORLIST
88#define RTASN1TMPL_EXT_NAME RTCrTafTrustAnchorList
89#define RTASN1TMPL_INT_NAME rtCrTafTrustAnchorList
90RTASN1TMPL_SEQ_OF(RTCRTAFTRUSTANCHORCHOICE, RTCrTafTrustAnchorChoice);
91#undef RTASN1TMPL_TYPE
92#undef RTASN1TMPL_EXT_NAME
93#undef RTASN1TMPL_INT_NAME
94
Note: See TracBrowser for help on using the repository browser.

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