xref: /titanic_44/usr/src/lib/libkmf/libkmf/common/kmfoids.c (revision e65e5c2d2f32a99e8c5f740cabae9075dab03ce7)
199ebb4caSwyllys /*
2*e65e5c2dSWyllys Ingersoll  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
39a767088Shaimay  * Use is subject to license terms.
499ebb4caSwyllys  */
599ebb4caSwyllys /*
699ebb4caSwyllys  * Copyright(c) 1995-2000 Intel Corporation. All rights reserved.
799ebb4caSwyllys  */
899ebb4caSwyllys 
999ebb4caSwyllys #include <kmfapi.h>
1099ebb4caSwyllys 
1199ebb4caSwyllys /* From X.520 */
1299ebb4caSwyllys static uint8_t
1399ebb4caSwyllys OID_ObjectClass[] = { OID_ATTR_TYPE, 0 },
1499ebb4caSwyllys OID_AliasedEntryName[] = { OID_ATTR_TYPE, 1 },
1599ebb4caSwyllys OID_KnowledgeInformation[] = { OID_ATTR_TYPE, 2 },
1699ebb4caSwyllys OID_CommonName[] = { OID_ATTR_TYPE, 3 },
1799ebb4caSwyllys OID_Surname[] = { OID_ATTR_TYPE, 4 },
1899ebb4caSwyllys OID_SerialNumber[] = { OID_ATTR_TYPE, 5 },
1999ebb4caSwyllys OID_CountryName[] = { OID_ATTR_TYPE, 6 },
2099ebb4caSwyllys OID_LocalityName[] = { OID_ATTR_TYPE, 7 },
2199ebb4caSwyllys OID_StateProvinceName[] = { OID_ATTR_TYPE, 8 },
2299ebb4caSwyllys OID_CollectiveStateProvinceName[] = { OID_ATTR_TYPE, 8, 1 },
2399ebb4caSwyllys OID_StreetAddress[] = { OID_ATTR_TYPE, 9 },
2499ebb4caSwyllys OID_CollectiveStreetAddress[] = { OID_ATTR_TYPE, 9, 1 },
2599ebb4caSwyllys OID_OrganizationName[] = { OID_ATTR_TYPE, 10 },
2699ebb4caSwyllys OID_CollectiveOrganizationName[] = { OID_ATTR_TYPE, 10, 1 },
2799ebb4caSwyllys OID_OrganizationalUnitName[] = { OID_ATTR_TYPE, 11 },
2899ebb4caSwyllys OID_CollectiveOrganizationalUnitName[] = { OID_ATTR_TYPE, 11, 1 },
2999ebb4caSwyllys OID_Title[] = { OID_ATTR_TYPE, 12 },
3099ebb4caSwyllys OID_Description[] = { OID_ATTR_TYPE, 13 },
3199ebb4caSwyllys OID_SearchGuide[] = { OID_ATTR_TYPE, 14 },
3299ebb4caSwyllys OID_BusinessCategory[] = { OID_ATTR_TYPE, 15 },
3399ebb4caSwyllys OID_PostalAddress[] = { OID_ATTR_TYPE, 16 },
3499ebb4caSwyllys OID_CollectivePostalAddress[] = { OID_ATTR_TYPE, 16, 1 },
3599ebb4caSwyllys OID_PostalCode[] = { OID_ATTR_TYPE, 17 },
3699ebb4caSwyllys OID_CollectivePostalCode[] = { OID_ATTR_TYPE, 17, 1 },
3799ebb4caSwyllys OID_PostOfficeBox[] = { OID_ATTR_TYPE, 18 },
3899ebb4caSwyllys OID_CollectivePostOfficeBox[] = { OID_ATTR_TYPE, 18, 1 },
3999ebb4caSwyllys OID_PhysicalDeliveryOfficeName[] = { OID_ATTR_TYPE, 19 },
4099ebb4caSwyllys OID_CollectivePhysicalDeliveryOfficeName[] = { OID_ATTR_TYPE, 19, 1 },
4199ebb4caSwyllys OID_TelephoneNumber[] = { OID_ATTR_TYPE, 20 },
4299ebb4caSwyllys OID_CollectiveTelephoneNumber[] = { OID_ATTR_TYPE, 20, 1 },
4399ebb4caSwyllys OID_TelexNumber[] = { OID_ATTR_TYPE, 21 },
4499ebb4caSwyllys OID_CollectiveTelexNumber[] = { OID_ATTR_TYPE, 21, 1 },
4599ebb4caSwyllys OID_TelexTerminalIdentifier[] = { OID_ATTR_TYPE, 22 },
4699ebb4caSwyllys OID_CollectiveTelexTerminalIdentifier[] = { OID_ATTR_TYPE, 22, 1 },
4799ebb4caSwyllys OID_FacsimileTelephoneNumber[] = { OID_ATTR_TYPE, 23 },
4899ebb4caSwyllys OID_CollectiveFacsimileTelephoneNumber[] = { OID_ATTR_TYPE, 23, 1 },
4999ebb4caSwyllys OID_X_121Address[] = { OID_ATTR_TYPE, 24 },
5099ebb4caSwyllys OID_InternationalISDNNumber[] = { OID_ATTR_TYPE, 25 },
5199ebb4caSwyllys OID_CollectiveInternationalISDNNumber[] = { OID_ATTR_TYPE, 25, 1 },
5299ebb4caSwyllys OID_RegisteredAddress[] = { OID_ATTR_TYPE, 26 },
5399ebb4caSwyllys OID_DestinationIndicator[] = { OID_ATTR_TYPE, 27 },
5499ebb4caSwyllys OID_PreferredDeliveryMethod[] = { OID_ATTR_TYPE, 28 },
5599ebb4caSwyllys OID_PresentationAddress[] = { OID_ATTR_TYPE, 29 },
5699ebb4caSwyllys OID_SupportedApplicationContext[] = { OID_ATTR_TYPE, 30 },
5799ebb4caSwyllys OID_Member[] = { OID_ATTR_TYPE, 31 },
5899ebb4caSwyllys OID_Owner[] = { OID_ATTR_TYPE, 32 },
5999ebb4caSwyllys OID_RoleOccupant[] = { OID_ATTR_TYPE, 33 },
6099ebb4caSwyllys OID_SeeAlso[] = { OID_ATTR_TYPE, 34 },
6199ebb4caSwyllys OID_UserPassword[] = { OID_ATTR_TYPE, 35 },
6299ebb4caSwyllys OID_UserCertificate[] = { OID_ATTR_TYPE, 36 },
6399ebb4caSwyllys OID_CACertificate[] = { OID_ATTR_TYPE, 37 },
6499ebb4caSwyllys OID_AuthorityRevocationList[] = { OID_ATTR_TYPE, 38 },
6599ebb4caSwyllys OID_CertificateRevocationList[] = { OID_ATTR_TYPE, 39 },
6699ebb4caSwyllys OID_CrossCertificatePair[] = { OID_ATTR_TYPE, 40 },
6799ebb4caSwyllys OID_Name[] = { OID_ATTR_TYPE, 41 },
6899ebb4caSwyllys OID_GivenName[] = { OID_ATTR_TYPE, 42 },
6999ebb4caSwyllys OID_Initials[] = { OID_ATTR_TYPE, 43 },
7099ebb4caSwyllys OID_GenerationQualifier[] = { OID_ATTR_TYPE, 44 },
7199ebb4caSwyllys OID_UniqueIdentifier[] = { OID_ATTR_TYPE, 45 },
7299ebb4caSwyllys OID_DNQualifier[] = { OID_ATTR_TYPE, 46 },
7399ebb4caSwyllys OID_EnhancedSearchGuide[] = { OID_ATTR_TYPE, 47 },
7499ebb4caSwyllys OID_ProtocolInformation[] = { OID_ATTR_TYPE, 48 },
7599ebb4caSwyllys OID_DistinguishedName[] = { OID_ATTR_TYPE, 49 },
7699ebb4caSwyllys OID_UniqueMember[] = { OID_ATTR_TYPE, 50 },
7799ebb4caSwyllys OID_HouseIdentifier[] = { OID_ATTR_TYPE, 51 }
7899ebb4caSwyllys /* OID_SupportedAlgorithms[] = { OID_ATTR_TYPE, 52 }, */
7999ebb4caSwyllys /* OID_DeltaRevocationList[] = { OID_ATTR_TYPE, 53 }, */
8099ebb4caSwyllys /* OID_AttributeCertificate[] = { OID_ATTR_TYPE, 58 } */
8199ebb4caSwyllys ;
8299ebb4caSwyllys 
8399ebb4caSwyllys /* From PKCS 9 */
8499ebb4caSwyllys static uint8_t
8599ebb4caSwyllys OID_EmailAddress[] = { OID_PKCS_9, 1 },
8699ebb4caSwyllys OID_UnstructuredName[] = { OID_PKCS_9, 2 },
8799ebb4caSwyllys OID_ContentType[] = { OID_PKCS_9, 3 },
8899ebb4caSwyllys OID_MessageDigest[] = { OID_PKCS_9, 4 },
8999ebb4caSwyllys OID_SigningTime[] = { OID_PKCS_9, 5 },
9099ebb4caSwyllys OID_CounterSignature[] = { OID_PKCS_9, 6 },
9199ebb4caSwyllys OID_ChallengePassword[] = { OID_PKCS_9, 7 },
9299ebb4caSwyllys OID_UnstructuredAddress[] = { OID_PKCS_9, 8 },
9399ebb4caSwyllys OID_ExtendedCertificateAttributes[] = { OID_PKCS_9, 9 },
9499ebb4caSwyllys OID_ExtensionRequest[] = { OID_PKCS_9, 14 };
9599ebb4caSwyllys 
9699ebb4caSwyllys /* From PKIX 1 */
9799ebb4caSwyllys /* Standard Extensions */
9899ebb4caSwyllys static uint8_t
9999ebb4caSwyllys OID_SubjectDirectoryAttributes[] = { OID_EXTENSION, 9 },
10099ebb4caSwyllys OID_SubjectKeyIdentifier[] = { OID_EXTENSION, 14 },
10199ebb4caSwyllys OID_KeyUsage[] = { OID_EXTENSION, 15 },
10299ebb4caSwyllys OID_PrivateKeyUsagePeriod[] = { OID_EXTENSION, 16 },
10399ebb4caSwyllys OID_SubjectAltName[] = { OID_EXTENSION, 17 },
10499ebb4caSwyllys OID_IssuerAltName[] = { OID_EXTENSION, 18 },
10599ebb4caSwyllys OID_BasicConstraints[] = { OID_EXTENSION, 19 },
10699ebb4caSwyllys OID_CrlNumber[] = { OID_EXTENSION, 20 },
10799ebb4caSwyllys OID_CrlReason[] = { OID_EXTENSION, 21 },
10899ebb4caSwyllys OID_HoldInstructionCode[] = { OID_EXTENSION, 23 },
10999ebb4caSwyllys OID_InvalidityDate[] = { OID_EXTENSION, 24 },
11099ebb4caSwyllys OID_DeltaCrlIndicator[] = { OID_EXTENSION, 27 },
11199ebb4caSwyllys OID_IssuingDistributionPoints[] = { OID_EXTENSION, 28 },
11299ebb4caSwyllys 
11399ebb4caSwyllys /* OID_CertificateIssuer[] = { OID_EXTENSION, 29 }, */
11499ebb4caSwyllys OID_NameConstraints[] = { OID_EXTENSION, 30 },
11599ebb4caSwyllys OID_CrlDistributionPoints[] = { OID_EXTENSION, 31 },
11699ebb4caSwyllys OID_CertificatePolicies[] = { OID_EXTENSION, 32 },
11799ebb4caSwyllys OID_PolicyMappings[] = { OID_EXTENSION, 33 },
11899ebb4caSwyllys /* 34 deprecated */
11999ebb4caSwyllys OID_AuthorityKeyIdentifier[] = { OID_EXTENSION, 35 },
12099ebb4caSwyllys OID_PolicyConstraints[] = { OID_EXTENSION, 36 },
12199ebb4caSwyllys OID_ExtKeyUsage[] = { OID_EXTENSION, 37 }
12299ebb4caSwyllys ;
12399ebb4caSwyllys 
12499ebb4caSwyllys /* PKIX-defined extended key purpose OIDs */
12599ebb4caSwyllys static uint8_t
12699ebb4caSwyllys OID_QT_CPSuri[]		 = { OID_PKIX_QT_CPS },
12799ebb4caSwyllys OID_QT_Unotice[]	 = { OID_PKIX_QT_UNOTICE },
12899ebb4caSwyllys 
12999ebb4caSwyllys OID_KP_ServerAuth[]	 = { OID_PKIX_KP, 1 },
13099ebb4caSwyllys OID_KP_ClientAuth[] = { OID_PKIX_KP, 2 },
13199ebb4caSwyllys OID_KP_CodeSigning[] = { OID_PKIX_KP, 3 },
13299ebb4caSwyllys OID_KP_EmailProtection[] = { OID_PKIX_KP, 4 },
13399ebb4caSwyllys OID_KP_IPSecEndSystem[] = { OID_PKIX_KP, 5 },
13499ebb4caSwyllys OID_KP_IPSecTunnel[] = { OID_PKIX_KP, 6 },
13599ebb4caSwyllys OID_KP_IPSecUser[] = { OID_PKIX_KP, 7 },
13699ebb4caSwyllys OID_KP_TimeStamping[] = { OID_PKIX_KP, 8 },
13799ebb4caSwyllys OID_KP_OCSPSigning[] = { OID_PKIX_KP, 9 }
13899ebb4caSwyllys ;
13999ebb4caSwyllys 
14099ebb4caSwyllys /* From PKIX 1 */
14199ebb4caSwyllys static uint8_t
14299ebb4caSwyllys OID_AuthorityInfoAccess[] = { OID_PKIX_PE, 1};
14399ebb4caSwyllys 
14499ebb4caSwyllys const KMF_OID
14599ebb4caSwyllys KMFOID_AuthorityInfoAccess = {OID_PKIX_LENGTH + 2, OID_AuthorityInfoAccess};
14699ebb4caSwyllys 
14799ebb4caSwyllys static uint8_t
14899ebb4caSwyllys OID_PkixAdOcsp[] = {OID_PKIX_AD, 1};
14999ebb4caSwyllys 
15099ebb4caSwyllys const KMF_OID
15199ebb4caSwyllys KMFOID_PkixAdOcsp = {OID_PKIX_AD_LENGTH + 1, OID_PkixAdOcsp};
15299ebb4caSwyllys 
15399ebb4caSwyllys static uint8_t
15499ebb4caSwyllys OID_PkixAdCaIssuers[] = {OID_PKIX_AD, 2};
15599ebb4caSwyllys 
15699ebb4caSwyllys const KMF_OID
15799ebb4caSwyllys KMFOID_PkixAdCaIssuers = {OID_PKIX_AD_LENGTH + 1, OID_PkixAdCaIssuers};
15899ebb4caSwyllys 
15999ebb4caSwyllys /*
16099ebb4caSwyllys  * From RFC 1274
16199ebb4caSwyllys  */
16299ebb4caSwyllys static uint8_t
16399ebb4caSwyllys OID_userid[] =		{OID_PILOT, 1},
16499ebb4caSwyllys OID_RFC822mailbox[] =	{OID_PILOT, 3},
16599ebb4caSwyllys OID_domainComponent[] =	{OID_PILOT, 25};
16699ebb4caSwyllys 
16799ebb4caSwyllys const KMF_OID
16899ebb4caSwyllys KMFOID_userid		= {OID_PILOT_LENGTH + 1, OID_userid},
16999ebb4caSwyllys KMFOID_RFC822mailbox	= {OID_PILOT_LENGTH + 1, OID_RFC822mailbox},
17099ebb4caSwyllys KMFOID_domainComponent	= {OID_PILOT_LENGTH + 1, OID_domainComponent},
17199ebb4caSwyllys KMFOID_ObjectClass = {OID_ATTR_TYPE_LENGTH+1, OID_ObjectClass},
17299ebb4caSwyllys KMFOID_AliasedEntryName = {OID_ATTR_TYPE_LENGTH+1, OID_AliasedEntryName},
17399ebb4caSwyllys KMFOID_KnowledgeInformation = {OID_ATTR_TYPE_LENGTH+1,
17499ebb4caSwyllys 	OID_KnowledgeInformation},
17599ebb4caSwyllys KMFOID_CommonName = {OID_ATTR_TYPE_LENGTH+1, OID_CommonName},
17699ebb4caSwyllys KMFOID_Surname = {OID_ATTR_TYPE_LENGTH+1, OID_Surname},
17799ebb4caSwyllys KMFOID_SerialNumber = {OID_ATTR_TYPE_LENGTH+1, OID_SerialNumber},
17899ebb4caSwyllys KMFOID_CountryName = {OID_ATTR_TYPE_LENGTH+1, OID_CountryName},
17999ebb4caSwyllys KMFOID_LocalityName = {OID_ATTR_TYPE_LENGTH+1, OID_LocalityName},
18099ebb4caSwyllys KMFOID_StateProvinceName = {OID_ATTR_TYPE_LENGTH+1, OID_StateProvinceName},
18199ebb4caSwyllys KMFOID_CollectiveStateProvinceName = {OID_ATTR_TYPE_LENGTH+2,
18299ebb4caSwyllys 	OID_CollectiveStateProvinceName},
18399ebb4caSwyllys KMFOID_StreetAddress = {OID_ATTR_TYPE_LENGTH+1, OID_StreetAddress},
18499ebb4caSwyllys KMFOID_CollectiveStreetAddress = {OID_ATTR_TYPE_LENGTH+2,
18599ebb4caSwyllys 	OID_CollectiveStreetAddress},
18699ebb4caSwyllys KMFOID_OrganizationName = {OID_ATTR_TYPE_LENGTH+1, OID_OrganizationName},
18799ebb4caSwyllys KMFOID_CollectiveOrganizationName = {OID_ATTR_TYPE_LENGTH+2,
18899ebb4caSwyllys 	OID_CollectiveOrganizationName},
18999ebb4caSwyllys KMFOID_OrganizationalUnitName = {OID_ATTR_TYPE_LENGTH+1,
19099ebb4caSwyllys 	OID_OrganizationalUnitName},
19199ebb4caSwyllys KMFOID_CollectiveOrganizationalUnitName = {OID_ATTR_TYPE_LENGTH+2,
19299ebb4caSwyllys 	OID_CollectiveOrganizationalUnitName},
19399ebb4caSwyllys KMFOID_Title = {OID_ATTR_TYPE_LENGTH+1, OID_Title},
19499ebb4caSwyllys KMFOID_Description = {OID_ATTR_TYPE_LENGTH+1, OID_Description},
19599ebb4caSwyllys KMFOID_SearchGuide = {OID_ATTR_TYPE_LENGTH+1, OID_SearchGuide},
19699ebb4caSwyllys KMFOID_BusinessCategory = {OID_ATTR_TYPE_LENGTH+1, OID_BusinessCategory},
19799ebb4caSwyllys KMFOID_PostalAddress = {OID_ATTR_TYPE_LENGTH+1, OID_PostalAddress},
19899ebb4caSwyllys KMFOID_CollectivePostalAddress = {OID_ATTR_TYPE_LENGTH+2,
19999ebb4caSwyllys 	OID_CollectivePostalAddress},
20099ebb4caSwyllys KMFOID_PostalCode = {OID_ATTR_TYPE_LENGTH+1, OID_PostalCode},
20199ebb4caSwyllys KMFOID_CollectivePostalCode = {OID_ATTR_TYPE_LENGTH+2,
20299ebb4caSwyllys 	OID_CollectivePostalCode},
20399ebb4caSwyllys KMFOID_PostOfficeBox = {OID_ATTR_TYPE_LENGTH+1, OID_PostOfficeBox},
20499ebb4caSwyllys KMFOID_CollectivePostOfficeBox = {OID_ATTR_TYPE_LENGTH+2,
20599ebb4caSwyllys 	OID_CollectivePostOfficeBox},
20699ebb4caSwyllys KMFOID_PhysicalDeliveryOfficeName = {OID_ATTR_TYPE_LENGTH+1,
20799ebb4caSwyllys 	OID_PhysicalDeliveryOfficeName},
20899ebb4caSwyllys KMFOID_CollectivePhysicalDeliveryOfficeName = {OID_ATTR_TYPE_LENGTH+2,
20999ebb4caSwyllys 	OID_CollectivePhysicalDeliveryOfficeName},
21099ebb4caSwyllys KMFOID_TelephoneNumber = {OID_ATTR_TYPE_LENGTH+1, OID_TelephoneNumber},
21199ebb4caSwyllys KMFOID_CollectiveTelephoneNumber = {OID_ATTR_TYPE_LENGTH+2,
21299ebb4caSwyllys 	OID_CollectiveTelephoneNumber},
21399ebb4caSwyllys KMFOID_TelexNumber = {OID_ATTR_TYPE_LENGTH+1, OID_TelexNumber},
21499ebb4caSwyllys KMFOID_CollectiveTelexNumber = {OID_ATTR_TYPE_LENGTH+2,
21599ebb4caSwyllys 	OID_CollectiveTelexNumber},
21699ebb4caSwyllys KMFOID_TelexTerminalIdentifier = {OID_ATTR_TYPE_LENGTH+1,
21799ebb4caSwyllys 	OID_TelexTerminalIdentifier},
21899ebb4caSwyllys KMFOID_CollectiveTelexTerminalIdentifier = {OID_ATTR_TYPE_LENGTH+2,
21999ebb4caSwyllys 	OID_CollectiveTelexTerminalIdentifier},
22099ebb4caSwyllys KMFOID_FacsimileTelephoneNumber = {OID_ATTR_TYPE_LENGTH+1,
22199ebb4caSwyllys 	OID_FacsimileTelephoneNumber},
22299ebb4caSwyllys KMFOID_CollectiveFacsimileTelephoneNumber = {OID_ATTR_TYPE_LENGTH+2,
22399ebb4caSwyllys 	OID_CollectiveFacsimileTelephoneNumber},
22499ebb4caSwyllys KMFOID_X_121Address = {OID_ATTR_TYPE_LENGTH+1, OID_X_121Address},
22599ebb4caSwyllys KMFOID_InternationalISDNNumber = {OID_ATTR_TYPE_LENGTH+1,
22699ebb4caSwyllys 	OID_InternationalISDNNumber},
22799ebb4caSwyllys KMFOID_CollectiveInternationalISDNNumber = {OID_ATTR_TYPE_LENGTH+2,
22899ebb4caSwyllys 	OID_CollectiveInternationalISDNNumber},
22999ebb4caSwyllys KMFOID_RegisteredAddress = {OID_ATTR_TYPE_LENGTH+1, OID_RegisteredAddress},
23099ebb4caSwyllys KMFOID_DestinationIndicator = {OID_ATTR_TYPE_LENGTH+1,
23199ebb4caSwyllys 	OID_DestinationIndicator},
23299ebb4caSwyllys KMFOID_PreferredDeliveryMethod = {OID_ATTR_TYPE_LENGTH+1,
23399ebb4caSwyllys 	OID_PreferredDeliveryMethod},
23499ebb4caSwyllys KMFOID_PresentationAddress = {OID_ATTR_TYPE_LENGTH+1,
23599ebb4caSwyllys 	OID_PresentationAddress},
23699ebb4caSwyllys KMFOID_SupportedApplicationContext = {OID_ATTR_TYPE_LENGTH+1,
23799ebb4caSwyllys 	OID_SupportedApplicationContext},
23899ebb4caSwyllys KMFOID_Member = {OID_ATTR_TYPE_LENGTH+1, OID_Member},
23999ebb4caSwyllys KMFOID_Owner = {OID_ATTR_TYPE_LENGTH+1, OID_Owner},
24099ebb4caSwyllys KMFOID_RoleOccupant = {OID_ATTR_TYPE_LENGTH+1, OID_RoleOccupant},
24199ebb4caSwyllys KMFOID_SeeAlso = {OID_ATTR_TYPE_LENGTH+1, OID_SeeAlso},
24299ebb4caSwyllys KMFOID_UserPassword = {OID_ATTR_TYPE_LENGTH+1, OID_UserPassword},
24399ebb4caSwyllys KMFOID_UserCertificate = {OID_ATTR_TYPE_LENGTH+1, OID_UserCertificate},
24499ebb4caSwyllys KMFOID_CACertificate = {OID_ATTR_TYPE_LENGTH+1, OID_CACertificate},
24599ebb4caSwyllys KMFOID_AuthorityRevocationList = {OID_ATTR_TYPE_LENGTH+1,
24699ebb4caSwyllys 	OID_AuthorityRevocationList},
24799ebb4caSwyllys KMFOID_CertificateRevocationList = {OID_ATTR_TYPE_LENGTH+1,
24899ebb4caSwyllys 	OID_CertificateRevocationList},
24999ebb4caSwyllys KMFOID_CrossCertificatePair = {OID_ATTR_TYPE_LENGTH+1,
25099ebb4caSwyllys 	OID_CrossCertificatePair},
25199ebb4caSwyllys KMFOID_Name = {OID_ATTR_TYPE_LENGTH+1, OID_Name},
25299ebb4caSwyllys KMFOID_GivenName = {OID_ATTR_TYPE_LENGTH+1, OID_GivenName},
25399ebb4caSwyllys KMFOID_Initials = {OID_ATTR_TYPE_LENGTH+1, OID_Initials},
25499ebb4caSwyllys KMFOID_GenerationQualifier = {OID_ATTR_TYPE_LENGTH+1, OID_GenerationQualifier},
25599ebb4caSwyllys KMFOID_UniqueIdentifier = {OID_ATTR_TYPE_LENGTH+1, OID_UniqueIdentifier},
25699ebb4caSwyllys KMFOID_DNQualifier = {OID_ATTR_TYPE_LENGTH+1, OID_DNQualifier},
25799ebb4caSwyllys KMFOID_EnhancedSearchGuide = {OID_ATTR_TYPE_LENGTH+1, OID_EnhancedSearchGuide},
25899ebb4caSwyllys KMFOID_ProtocolInformation = {OID_ATTR_TYPE_LENGTH+1, OID_ProtocolInformation},
25999ebb4caSwyllys KMFOID_DistinguishedName = {OID_ATTR_TYPE_LENGTH+1, OID_DistinguishedName},
26099ebb4caSwyllys KMFOID_UniqueMember = {OID_ATTR_TYPE_LENGTH+1, OID_UniqueMember},
26199ebb4caSwyllys KMFOID_HouseIdentifier = {OID_ATTR_TYPE_LENGTH+1, OID_HouseIdentifier},
26299ebb4caSwyllys KMFOID_EmailAddress = {OID_PKCS_9_LENGTH+1, OID_EmailAddress},
26399ebb4caSwyllys KMFOID_UnstructuredName = {OID_PKCS_9_LENGTH+1, OID_UnstructuredName},
26499ebb4caSwyllys KMFOID_ContentType = {OID_PKCS_9_LENGTH+1, OID_ContentType},
26599ebb4caSwyllys KMFOID_MessageDigest = {OID_PKCS_9_LENGTH+1, OID_MessageDigest},
26699ebb4caSwyllys KMFOID_SigningTime = {OID_PKCS_9_LENGTH+1, OID_SigningTime},
26799ebb4caSwyllys KMFOID_CounterSignature = {OID_PKCS_9_LENGTH+1, OID_CounterSignature},
26899ebb4caSwyllys KMFOID_ChallengePassword = {OID_PKCS_9_LENGTH+1, OID_ChallengePassword},
26999ebb4caSwyllys KMFOID_UnstructuredAddress = {OID_PKCS_9_LENGTH+1, OID_UnstructuredAddress},
27099ebb4caSwyllys KMFOID_ExtendedCertificateAttributes = {OID_PKCS_9_LENGTH+1,
27199ebb4caSwyllys 	OID_ExtendedCertificateAttributes},
27299ebb4caSwyllys KMFOID_ExtensionRequest = {OID_PKCS_9_LENGTH + 1, OID_ExtensionRequest};
27399ebb4caSwyllys 
27499ebb4caSwyllys static uint8_t
27599ebb4caSwyllys OID_AuthorityKeyID[] = { OID_EXTENSION, 1 },
27699ebb4caSwyllys OID_VerisignCertificatePolicy[] = { OID_EXTENSION, 3 },
27799ebb4caSwyllys OID_KeyUsageRestriction[] = { OID_EXTENSION, 4 };
27899ebb4caSwyllys 
27999ebb4caSwyllys const KMF_OID
28099ebb4caSwyllys KMFOID_AuthorityKeyID		 = {OID_EXTENSION_LENGTH+1, OID_AuthorityKeyID},
28199ebb4caSwyllys 
28299ebb4caSwyllys KMFOID_VerisignCertificatePolicy = {OID_EXTENSION_LENGTH+1,
28399ebb4caSwyllys 	OID_VerisignCertificatePolicy},
28499ebb4caSwyllys 
28599ebb4caSwyllys KMFOID_KeyUsageRestriction	 = {OID_EXTENSION_LENGTH+1,
28699ebb4caSwyllys 	OID_KeyUsageRestriction},
28799ebb4caSwyllys 
28899ebb4caSwyllys KMFOID_SubjectDirectoryAttributes = {OID_EXTENSION_LENGTH+1,
28999ebb4caSwyllys 	OID_SubjectDirectoryAttributes},
29099ebb4caSwyllys 
29199ebb4caSwyllys KMFOID_SubjectKeyIdentifier	 = {OID_EXTENSION_LENGTH+1,
29299ebb4caSwyllys 	OID_SubjectKeyIdentifier },
29399ebb4caSwyllys KMFOID_KeyUsage		 = {OID_EXTENSION_LENGTH+1, OID_KeyUsage },
29499ebb4caSwyllys 
29599ebb4caSwyllys KMFOID_PrivateKeyUsagePeriod	 = {OID_EXTENSION_LENGTH+1,
29699ebb4caSwyllys 	OID_PrivateKeyUsagePeriod},
29799ebb4caSwyllys KMFOID_SubjectAltName	 = {OID_EXTENSION_LENGTH+1, OID_SubjectAltName },
29899ebb4caSwyllys KMFOID_IssuerAltName	 = {OID_EXTENSION_LENGTH+1, OID_IssuerAltName },
29999ebb4caSwyllys KMFOID_BasicConstraints	 = {OID_EXTENSION_LENGTH+1, OID_BasicConstraints },
30099ebb4caSwyllys 
30199ebb4caSwyllys KMFOID_CrlNumber	 = {OID_EXTENSION_LENGTH+1, OID_CrlNumber},
30299ebb4caSwyllys 
30399ebb4caSwyllys KMFOID_CrlReason	 = {OID_EXTENSION_LENGTH+1, OID_CrlReason},
30499ebb4caSwyllys 
30599ebb4caSwyllys KMFOID_HoldInstructionCode = {OID_EXTENSION_LENGTH+1, OID_HoldInstructionCode},
30699ebb4caSwyllys 
30799ebb4caSwyllys KMFOID_InvalidityDate	 = {OID_EXTENSION_LENGTH+1, OID_InvalidityDate},
30899ebb4caSwyllys 
30999ebb4caSwyllys KMFOID_DeltaCrlIndicator = {OID_EXTENSION_LENGTH+1, OID_DeltaCrlIndicator},
31099ebb4caSwyllys 
31199ebb4caSwyllys KMFOID_IssuingDistributionPoints = {OID_EXTENSION_LENGTH+1,
31299ebb4caSwyllys 	OID_IssuingDistributionPoints},
31399ebb4caSwyllys 
31499ebb4caSwyllys KMFOID_NameConstraints	 = {OID_EXTENSION_LENGTH+1,
31599ebb4caSwyllys 	OID_NameConstraints},
31699ebb4caSwyllys 
31799ebb4caSwyllys KMFOID_CrlDistributionPoints = {OID_EXTENSION_LENGTH+1,
31899ebb4caSwyllys 	OID_CrlDistributionPoints},
31999ebb4caSwyllys 
32099ebb4caSwyllys KMFOID_CertificatePolicies = {OID_EXTENSION_LENGTH+1,
32199ebb4caSwyllys 	OID_CertificatePolicies},
32299ebb4caSwyllys 
32399ebb4caSwyllys KMFOID_PolicyMappings	 = {OID_EXTENSION_LENGTH+1, OID_PolicyMappings},
32499ebb4caSwyllys 
32599ebb4caSwyllys KMFOID_PolicyConstraints = {OID_EXTENSION_LENGTH+1, OID_PolicyConstraints},
32699ebb4caSwyllys 
32799ebb4caSwyllys KMFOID_AuthorityKeyIdentifier = {OID_EXTENSION_LENGTH+1,
32899ebb4caSwyllys 	OID_AuthorityKeyIdentifier},
32999ebb4caSwyllys 
33099ebb4caSwyllys KMFOID_ExtendedKeyUsage	 = {OID_EXTENSION_LENGTH+1, OID_ExtKeyUsage},
33199ebb4caSwyllys 
33299ebb4caSwyllys KMFOID_PKIX_PQ_CPSuri	 = {OID_PKIX_QT_CPS_LENGTH, 	OID_QT_CPSuri},
33399ebb4caSwyllys 
33499ebb4caSwyllys KMFOID_PKIX_PQ_Unotice	 = {OID_PKIX_QT_UNOTICE_LENGTH,	OID_QT_Unotice},
33599ebb4caSwyllys 
33699ebb4caSwyllys /* Extended Key Usage OIDs */
33799ebb4caSwyllys KMFOID_PKIX_KP_ServerAuth = {OID_PKIX_KP_LENGTH + 1, OID_KP_ServerAuth},
33899ebb4caSwyllys 
33999ebb4caSwyllys KMFOID_PKIX_KP_ClientAuth = {OID_PKIX_KP_LENGTH + 1, OID_KP_ClientAuth},
34099ebb4caSwyllys 
34199ebb4caSwyllys KMFOID_PKIX_KP_CodeSigning = {OID_PKIX_KP_LENGTH + 1, OID_KP_CodeSigning},
34299ebb4caSwyllys 
34399ebb4caSwyllys KMFOID_PKIX_KP_EmailProtection	 = {OID_PKIX_KP_LENGTH + 1,
34499ebb4caSwyllys 	OID_KP_EmailProtection},
34599ebb4caSwyllys 
34699ebb4caSwyllys KMFOID_PKIX_KP_IPSecEndSystem = {OID_PKIX_KP_LENGTH + 1, OID_KP_IPSecEndSystem},
34799ebb4caSwyllys 
34899ebb4caSwyllys KMFOID_PKIX_KP_IPSecTunnel = {OID_PKIX_KP_LENGTH + 1, OID_KP_IPSecTunnel},
34999ebb4caSwyllys 
35099ebb4caSwyllys KMFOID_PKIX_KP_IPSecUser = {OID_PKIX_KP_LENGTH + 1, OID_KP_IPSecUser},
35199ebb4caSwyllys 
35299ebb4caSwyllys KMFOID_PKIX_KP_TimeStamping = {OID_PKIX_KP_LENGTH + 1, OID_KP_TimeStamping},
35399ebb4caSwyllys 
35499ebb4caSwyllys KMFOID_PKIX_KP_OCSPSigning = {OID_PKIX_KP_LENGTH + 1, OID_KP_OCSPSigning};
35502744e81Swyllys 
35602744e81Swyllys static uint8_t
35702744e81Swyllys OID_OIW_SHA1[] = { OID_OIW_ALGORITHM, 26},
35802744e81Swyllys OID_OIW_DSA[] = { OID_OIW_ALGORITHM, 12  },
359448b8615Swyllys OID_OIW_DSAWithSHA1[] = { OID_OIW_ALGORITHM, 13 },
36002744e81Swyllys OID_RSAEncryption[] = { OID_PKCS_1, 1 },
36102744e81Swyllys OID_MD2WithRSA[]   = { OID_PKCS_1, 2 },
36202744e81Swyllys OID_MD5WithRSA[]   = { OID_PKCS_1, 4 },
36302744e81Swyllys OID_SHA1WithRSA[]  = { OID_PKCS_1, 5 },
364*e65e5c2dSWyllys Ingersoll OID_SHA256WithRSA[]  = { OID_PKCS_1, 11 },
365*e65e5c2dSWyllys Ingersoll OID_SHA384WithRSA[]  = { OID_PKCS_1, 12 },
366*e65e5c2dSWyllys Ingersoll OID_SHA512WithRSA[]  = { OID_PKCS_1, 13 },
36702744e81Swyllys OID_X9CM_DSA[] = { OID_X9CM_X9ALGORITHM, 1 },
36802744e81Swyllys OID_X9CM_DSAWithSHA1[] = { OID_X9CM_X9ALGORITHM, 3};
36902744e81Swyllys 
37002744e81Swyllys const KMF_OID
37102744e81Swyllys KMFOID_SHA1 = {OID_OIW_ALGORITHM_LENGTH+1, OID_OIW_SHA1},
37202744e81Swyllys KMFOID_RSA = {OID_PKCS_1_LENGTH+1, OID_RSAEncryption},
37302744e81Swyllys KMFOID_DSA = {OID_OIW_ALGORITHM_LENGTH+1, OID_OIW_DSA},
37402744e81Swyllys KMFOID_MD5WithRSA = {OID_PKCS_1_LENGTH+1, OID_MD5WithRSA},
37502744e81Swyllys KMFOID_MD2WithRSA = {OID_PKCS_1_LENGTH+1, OID_MD2WithRSA},
37602744e81Swyllys KMFOID_SHA1WithRSA = {OID_PKCS_1_LENGTH+1, OID_SHA1WithRSA},
377*e65e5c2dSWyllys Ingersoll KMFOID_SHA256WithRSA = {OID_PKCS_1_LENGTH+1, OID_SHA256WithRSA},
378*e65e5c2dSWyllys Ingersoll KMFOID_SHA384WithRSA = {OID_PKCS_1_LENGTH+1, OID_SHA384WithRSA},
379*e65e5c2dSWyllys Ingersoll KMFOID_SHA512WithRSA = {OID_PKCS_1_LENGTH+1, OID_SHA512WithRSA},
38002744e81Swyllys KMFOID_SHA1WithDSA  = {OID_OIW_ALGORITHM_LENGTH+1, OID_OIW_DSAWithSHA1},
38102744e81Swyllys KMFOID_X9CM_DSA = {OID_X9CM_X9ALGORITHM_LENGTH+1, OID_X9CM_DSA},
38202744e81Swyllys KMFOID_X9CM_DSAWithSHA1 = {OID_X9CM_X9ALGORITHM_LENGTH+1,
38302744e81Swyllys 		OID_X9CM_DSAWithSHA1};
384d00756ccSwyllys 
385d00756ccSwyllys /*
386d00756ccSwyllys  * New for PKINIT support.
387d00756ccSwyllys  */
388d00756ccSwyllys static uint8_t
389d00756ccSwyllys OID_pkinit_san[] = { OID_KRB5_SAN },
390d00756ccSwyllys OID_pkinit_san_upn[] = { OID_MS_KP_SC_LOGON_UPN },
391d00756ccSwyllys OID_pkinit_kp_clientauth[] = { OID_KRB5_PKINIT_KPCLIENTAUTH },
392d00756ccSwyllys OID_pkinit_kp_kdc[] = { OID_KRB5_PKINIT_KPKDC },
393d00756ccSwyllys OID_pkinit_kp_sc_logon[] = { OID_MS_KP_SC_LOGON };
394d00756ccSwyllys 
395d00756ccSwyllys const KMF_OID
396d00756ccSwyllys KMFOID_PKINIT_san = {OID_KRB5_SAN_LENGTH, OID_pkinit_san },
397d00756ccSwyllys KMFOID_PKINIT_ClientAuth = {OID_KRB5_PKINIT_KPCLIENTAUTH_LENGTH,
398d00756ccSwyllys     OID_pkinit_kp_clientauth},
399d00756ccSwyllys KMFOID_PKINIT_Kdc = {OID_KRB5_PKINIT_KPKDC_LENGTH,
400d00756ccSwyllys     OID_pkinit_kp_kdc},
401d00756ccSwyllys KMFOID_MS_KP_SCLogon = {OID_MS_KP_SC_LOGON_LENGTH,
402d00756ccSwyllys     OID_pkinit_kp_sc_logon},
403d00756ccSwyllys KMFOID_MS_KP_SCLogon_UPN = {OID_MS_KP_SC_LOGON_UPN_LENGTH,
404d00756ccSwyllys     OID_pkinit_san_upn};
405*e65e5c2dSWyllys Ingersoll 
406*e65e5c2dSWyllys Ingersoll /*
407*e65e5c2dSWyllys Ingersoll  * MD5
408*e65e5c2dSWyllys Ingersoll  * iso(1) member-body(2) us(840) rsadsi(113549)
409*e65e5c2dSWyllys Ingersoll  * digestAlgorithm(2) 5
410*e65e5c2dSWyllys Ingersoll  */
411*e65e5c2dSWyllys Ingersoll #define	RSADSI 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d
412*e65e5c2dSWyllys Ingersoll #define	OID_id_md5	RSADSI, 0x02, 0x05
413*e65e5c2dSWyllys Ingersoll 
414*e65e5c2dSWyllys Ingersoll /*
415*e65e5c2dSWyllys Ingersoll  * SHA2 OIDs
416*e65e5c2dSWyllys Ingersoll  */
417*e65e5c2dSWyllys Ingersoll #define	NIST_ALG 96, 134, 72, 1, 101, 3, 4
418*e65e5c2dSWyllys Ingersoll #define	NIST_HASH NIST_ALG, 2
419*e65e5c2dSWyllys Ingersoll #define	OID_id_sha256 NIST_HASH, 1
420*e65e5c2dSWyllys Ingersoll #define	OID_id_sha384 NIST_HASH, 2
421*e65e5c2dSWyllys Ingersoll #define	OID_id_sha512 NIST_HASH, 3
422*e65e5c2dSWyllys Ingersoll #define	OID_id_sha224 NIST_HASH, 4
423*e65e5c2dSWyllys Ingersoll 
424*e65e5c2dSWyllys Ingersoll #define	OID_id_dsa_with_sha224	NIST_ALG, 3, 1
425*e65e5c2dSWyllys Ingersoll #define	OID_id_dsa_with_sha256	NIST_ALG, 3, 2
426*e65e5c2dSWyllys Ingersoll 
427*e65e5c2dSWyllys Ingersoll /*
428*e65e5c2dSWyllys Ingersoll  * For ECC support.
429*e65e5c2dSWyllys Ingersoll  */
430*e65e5c2dSWyllys Ingersoll #define	CERTICOM_OID	0x2b, 0x81, 0x04
431*e65e5c2dSWyllys Ingersoll #define	SECG_OID	CERTICOM_OID, 0x00
432*e65e5c2dSWyllys Ingersoll 
433*e65e5c2dSWyllys Ingersoll #define	ANSI_X962_OID		0x2a, 0x86, 0x48, 0xce, 0x3d
434*e65e5c2dSWyllys Ingersoll #define	ANSI_X962_CURVE_OID	ANSI_X962_OID, 0x03
435*e65e5c2dSWyllys Ingersoll #define	ANSI_X962_GF2m_OID	ANSI_X962_CURVE_OID, 0x00
436*e65e5c2dSWyllys Ingersoll #define	ANSI_X962_GFp_OID	ANSI_X962_CURVE_OID, 0x01
437*e65e5c2dSWyllys Ingersoll 
438*e65e5c2dSWyllys Ingersoll #define	ANSI_X962_SIG_OID	ANSI_X962_OID, 0x04
439*e65e5c2dSWyllys Ingersoll #define	OID_ecdsa_with_sha224	ANSI_X962_SIG_OID, 3, 1
440*e65e5c2dSWyllys Ingersoll #define	OID_ecdsa_with_sha256	ANSI_X962_SIG_OID, 3, 2
441*e65e5c2dSWyllys Ingersoll #define	OID_ecdsa_with_sha384	ANSI_X962_SIG_OID, 3, 3
442*e65e5c2dSWyllys Ingersoll #define	OID_ecdsa_with_sha512	ANSI_X962_SIG_OID, 3, 4
443*e65e5c2dSWyllys Ingersoll 
444*e65e5c2dSWyllys Ingersoll static uint8_t
445*e65e5c2dSWyllys Ingersoll OID_secp112r1[] = { 0x6, 0x5, SECG_OID, 0x06 },
446*e65e5c2dSWyllys Ingersoll OID_secp112r2[] = { 0x6, 0x5, SECG_OID, 0x07 },
447*e65e5c2dSWyllys Ingersoll OID_secp128r1[] = { 0x6, 0x5, SECG_OID, 0x1c },
448*e65e5c2dSWyllys Ingersoll OID_secp128r2[] = { 0x6, 0x5, SECG_OID, 0x1d },
449*e65e5c2dSWyllys Ingersoll OID_secp160k1[] = { 0x6, 0x5, SECG_OID, 0x09 },
450*e65e5c2dSWyllys Ingersoll OID_secp160r1[] = { 0x6, 0x5, SECG_OID, 0x08 },
451*e65e5c2dSWyllys Ingersoll OID_secp160r2[] = { 0x6, 0x5, SECG_OID, 0x1e },
452*e65e5c2dSWyllys Ingersoll OID_secp192k1[] = { 0x6, 0x5, SECG_OID, 0x1f },
453*e65e5c2dSWyllys Ingersoll OID_secp224k1[] = { 0x6, 0x5, SECG_OID, 0x20 },
454*e65e5c2dSWyllys Ingersoll OID_secp224r1[] = { 0x6, 0x5, SECG_OID, 0x21 },
455*e65e5c2dSWyllys Ingersoll OID_secp256k1[] = { 0x6, 0x5, SECG_OID, 0x0a },
456*e65e5c2dSWyllys Ingersoll OID_secp384r1[] = { 0x6, 0x5, SECG_OID, 0x22 },
457*e65e5c2dSWyllys Ingersoll OID_secp521r1[] = { 0x6, 0x5, SECG_OID, 0x23 },
458*e65e5c2dSWyllys Ingersoll OID_sect113r1[] = { 0x6, 0x5, SECG_OID, 0x04 },
459*e65e5c2dSWyllys Ingersoll OID_sect113r2[] = { 0x6, 0x5, SECG_OID, 0x05 },
460*e65e5c2dSWyllys Ingersoll OID_sect131r1[] = { 0x6, 0x5, SECG_OID, 0x16 },
461*e65e5c2dSWyllys Ingersoll OID_sect131r2[] = { 0x6, 0x5, SECG_OID, 0x17 },
462*e65e5c2dSWyllys Ingersoll OID_sect163k1[] = { 0x6, 0x5, SECG_OID, 0x01 },
463*e65e5c2dSWyllys Ingersoll OID_sect163r1[] = { 0x6, 0x5, SECG_OID, 0x02 },
464*e65e5c2dSWyllys Ingersoll OID_sect163r2[] = { 0x6, 0x5, SECG_OID, 0x0f },
465*e65e5c2dSWyllys Ingersoll OID_sect193r1[] = { 0x6, 0x5, SECG_OID, 0x18 },
466*e65e5c2dSWyllys Ingersoll OID_sect193r2[] = { 0x6, 0x5, SECG_OID, 0x19 },
467*e65e5c2dSWyllys Ingersoll OID_sect233k1[] = { 0x6, 0x5, SECG_OID, 0x1a },
468*e65e5c2dSWyllys Ingersoll OID_sect233r1[] = { 0x6, 0x5, SECG_OID, 0x1b },
469*e65e5c2dSWyllys Ingersoll OID_sect239k1[] = { 0x6, 0x5, SECG_OID, 0x03 },
470*e65e5c2dSWyllys Ingersoll OID_sect283k1[] = { 0x6, 0x5, SECG_OID, 0x10 },
471*e65e5c2dSWyllys Ingersoll OID_sect283r1[] = { 0x6, 0x5, SECG_OID, 0x11 },
472*e65e5c2dSWyllys Ingersoll OID_sect409k1[] = { 0x6, 0x5, SECG_OID, 0x24 },
473*e65e5c2dSWyllys Ingersoll OID_sect409r1[] = { 0x6, 0x5, SECG_OID, 0x25 },
474*e65e5c2dSWyllys Ingersoll OID_sect571k1[] = { 0x6, 0x5, SECG_OID, 0x26 },
475*e65e5c2dSWyllys Ingersoll OID_sect571r1[] = { 0x6, 0x5, SECG_OID, 0x27 },
476*e65e5c2dSWyllys Ingersoll OID_c2pnb163v1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x01 },
477*e65e5c2dSWyllys Ingersoll OID_c2pnb163v2[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x02 },
478*e65e5c2dSWyllys Ingersoll OID_c2pnb163v3[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x03 },
479*e65e5c2dSWyllys Ingersoll OID_c2pnb176v1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x04 },
480*e65e5c2dSWyllys Ingersoll OID_c2tnb191v1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x05 },
481*e65e5c2dSWyllys Ingersoll OID_c2tnb191v2[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x06 },
482*e65e5c2dSWyllys Ingersoll OID_c2tnb191v3[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x07 },
483*e65e5c2dSWyllys Ingersoll OID_c2pnb208w1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x0a },
484*e65e5c2dSWyllys Ingersoll OID_c2tnb239v1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x0b },
485*e65e5c2dSWyllys Ingersoll OID_c2tnb239v2[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x0c },
486*e65e5c2dSWyllys Ingersoll OID_c2tnb239v3[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x0d },
487*e65e5c2dSWyllys Ingersoll OID_c2pnb272w1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x10 },
488*e65e5c2dSWyllys Ingersoll OID_c2pnb304w1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x11 },
489*e65e5c2dSWyllys Ingersoll OID_c2tnb359v1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x12 },
490*e65e5c2dSWyllys Ingersoll OID_c2pnb368w1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x13 },
491*e65e5c2dSWyllys Ingersoll OID_c2tnb431r1[] = { 0x6, 0x8, ANSI_X962_GF2m_OID, 0x14 },
492*e65e5c2dSWyllys Ingersoll 
493*e65e5c2dSWyllys Ingersoll OID_prime192v2[] = { 0x6, 0x8, ANSI_X962_GFp_OID, 0x02 },
494*e65e5c2dSWyllys Ingersoll OID_prime192v3[] = { 0x6, 0x8, ANSI_X962_GFp_OID, 0x03 },
495*e65e5c2dSWyllys Ingersoll 
496*e65e5c2dSWyllys Ingersoll OID_secp192r1[] = { 0x6, 0x8, ANSI_X962_GFp_OID, 0x01 },
497*e65e5c2dSWyllys Ingersoll OID_secp256r1[] = { 0x6, 0x8, ANSI_X962_GFp_OID, 0x07 };
498*e65e5c2dSWyllys Ingersoll 
499*e65e5c2dSWyllys Ingersoll const KMF_OID
500*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp112r1 = {sizeof (OID_secp112r1), OID_secp112r1},
501*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp112r2 = {sizeof (OID_secp112r2), OID_secp112r2},
502*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp128r1 = {sizeof (OID_secp128r1), OID_secp128r1},
503*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp128r2 = {sizeof (OID_secp128r2), OID_secp128r2},
504*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp160k1 = {sizeof (OID_secp160k1), OID_secp160k1},
505*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp160r1 = {sizeof (OID_secp160r1), OID_secp160r1},
506*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp160r2 = {sizeof (OID_secp160r2), OID_secp160r2},
507*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp192k1 = {sizeof (OID_secp192k1), OID_secp192k1},
508*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp224k1 = {sizeof (OID_secp224k1), OID_secp224k1},
509*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp224r1 = {sizeof (OID_secp224r1), OID_secp224r1},
510*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp256k1 = {sizeof (OID_secp256k1), OID_secp256k1},
511*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp384r1 = {sizeof (OID_secp384r1), OID_secp384r1},
512*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp521r1 = {sizeof (OID_secp521r1), OID_secp521r1},
513*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect113r1 = {sizeof (OID_sect113r1), OID_sect113r1},
514*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect113r2 = {sizeof (OID_sect113r2), OID_sect113r2},
515*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect131r1 = {sizeof (OID_sect131r1), OID_sect131r1},
516*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect131r2 = {sizeof (OID_sect131r2), OID_sect131r2},
517*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect163k1 = {sizeof (OID_sect163k1), OID_sect163k1},
518*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect163r1 = {sizeof (OID_sect163r1), OID_sect163r1},
519*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect163r2 = {sizeof (OID_sect163r2), OID_sect163r2},
520*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect193r1 = {sizeof (OID_sect193r1), OID_sect193r1},
521*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect193r2 = {sizeof (OID_sect193r2), OID_sect193r2},
522*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect233k1 = {sizeof (OID_sect233k1), OID_sect233k1},
523*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect233r1 = {sizeof (OID_sect233r1), OID_sect233r1},
524*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect239k1 = {sizeof (OID_sect239k1), OID_sect239k1},
525*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect283k1 = {sizeof (OID_sect283k1), OID_sect283k1},
526*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect283r1 = {sizeof (OID_sect283r1), OID_sect283r1},
527*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect409k1 = {sizeof (OID_sect409k1), OID_sect409k1},
528*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect409r1 = {sizeof (OID_sect409r1), OID_sect409r1},
529*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect571k1 = {sizeof (OID_sect571k1), OID_sect571k1},
530*e65e5c2dSWyllys Ingersoll KMFOID_ECC_sect571r1 = {sizeof (OID_sect571r1), OID_sect571r1},
531*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2pnb163v1 = {sizeof (OID_c2pnb163v1), OID_c2pnb163v1},
532*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2pnb163v2 = {sizeof (OID_c2pnb163v2), OID_c2pnb163v2},
533*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2pnb163v3 = {sizeof (OID_c2pnb163v3), OID_c2pnb163v3},
534*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2pnb176v1 = {sizeof (OID_c2pnb176v1), OID_c2pnb176v1},
535*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2tnb191v1 = {sizeof (OID_c2tnb191v1), OID_c2tnb191v1},
536*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2tnb191v2 = {sizeof (OID_c2tnb191v2), OID_c2tnb191v2},
537*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2tnb191v3 = {sizeof (OID_c2tnb191v3), OID_c2tnb191v3},
538*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2pnb208w1 = {sizeof (OID_c2pnb208w1), OID_c2pnb208w1},
539*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2tnb239v1 = {sizeof (OID_c2tnb239v1), OID_c2tnb239v1},
540*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2tnb239v2 = {sizeof (OID_c2tnb239v2), OID_c2tnb239v2},
541*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2tnb239v3 = {sizeof (OID_c2tnb239v3), OID_c2tnb239v3},
542*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2pnb272w1 = {sizeof (OID_c2pnb272w1), OID_c2pnb272w1},
543*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2pnb304w1 = {sizeof (OID_c2pnb304w1), OID_c2pnb304w1},
544*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2tnb359v1 = {sizeof (OID_c2tnb359v1), OID_c2tnb359v1},
545*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2pnb368w1 = {sizeof (OID_c2pnb368w1), OID_c2pnb368w1},
546*e65e5c2dSWyllys Ingersoll KMFOID_ECC_c2tnb431r1 = {sizeof (OID_c2tnb431r1), OID_c2tnb431r1},
547*e65e5c2dSWyllys Ingersoll KMFOID_ECC_prime192v2 = {sizeof (OID_prime192v2), OID_prime192v2},
548*e65e5c2dSWyllys Ingersoll KMFOID_ECC_prime192v3 = {sizeof (OID_prime192v3), OID_prime192v3},
549*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp192r1 = {sizeof (OID_secp192r1), OID_secp192r1},
550*e65e5c2dSWyllys Ingersoll KMFOID_ECC_secp256r1 = {sizeof (OID_secp256r1), OID_secp256r1};
551*e65e5c2dSWyllys Ingersoll 
552*e65e5c2dSWyllys Ingersoll static uint8_t
553*e65e5c2dSWyllys Ingersoll OID_EC_PUBLIC_KEY[] = {ANSI_X962_OID, 0x02, 0x01},
554*e65e5c2dSWyllys Ingersoll OID_ECDSA_SHA1[] = {ANSI_X962_OID, 0x04, 0x01},
555*e65e5c2dSWyllys Ingersoll OID_ECDSA_SHA224[] = {ANSI_X962_OID, 0x04, 0x03, 0x01},
556*e65e5c2dSWyllys Ingersoll OID_ECDSA_SHA256[] = {ANSI_X962_OID, 0x04, 0x03, 0x02},
557*e65e5c2dSWyllys Ingersoll OID_ECDSA_SHA384[] = {ANSI_X962_OID, 0x04, 0x03, 0x03},
558*e65e5c2dSWyllys Ingersoll OID_ECDSA_SHA512[] = {ANSI_X962_OID, 0x04, 0x03, 0x04},
559*e65e5c2dSWyllys Ingersoll OID_DSA_SHA224[] = {OID_id_dsa_with_sha224},
560*e65e5c2dSWyllys Ingersoll OID_DSA_SHA256[] = {OID_id_dsa_with_sha256},
561*e65e5c2dSWyllys Ingersoll OID_SHA224[] = {OID_id_sha224},
562*e65e5c2dSWyllys Ingersoll OID_SHA256[] = {OID_id_sha256},
563*e65e5c2dSWyllys Ingersoll OID_SHA384[] = {OID_id_sha384},
564*e65e5c2dSWyllys Ingersoll OID_SHA512[] = {OID_id_sha512},
565*e65e5c2dSWyllys Ingersoll OID_MD5[] = {OID_id_md5};
566*e65e5c2dSWyllys Ingersoll 
567*e65e5c2dSWyllys Ingersoll const KMF_OID
568*e65e5c2dSWyllys Ingersoll KMFOID_EC_PUBLIC_KEY = { sizeof (OID_EC_PUBLIC_KEY), OID_EC_PUBLIC_KEY},
569*e65e5c2dSWyllys Ingersoll KMFOID_SHA1WithECDSA = { sizeof (OID_ECDSA_SHA1), OID_ECDSA_SHA1},
570*e65e5c2dSWyllys Ingersoll KMFOID_SHA224WithECDSA = { sizeof (OID_ECDSA_SHA224), OID_ECDSA_SHA224},
571*e65e5c2dSWyllys Ingersoll KMFOID_SHA256WithECDSA = { sizeof (OID_ECDSA_SHA256), OID_ECDSA_SHA256},
572*e65e5c2dSWyllys Ingersoll KMFOID_SHA384WithECDSA = { sizeof (OID_ECDSA_SHA384), OID_ECDSA_SHA384},
573*e65e5c2dSWyllys Ingersoll KMFOID_SHA512WithECDSA = { sizeof (OID_ECDSA_SHA512), OID_ECDSA_SHA512},
574*e65e5c2dSWyllys Ingersoll KMFOID_SHA224WithDSA = { sizeof (OID_DSA_SHA224), OID_DSA_SHA224},
575*e65e5c2dSWyllys Ingersoll KMFOID_SHA256WithDSA = { sizeof (OID_DSA_SHA256), OID_DSA_SHA256},
576*e65e5c2dSWyllys Ingersoll KMFOID_SHA224 = { sizeof (OID_SHA224), OID_SHA224},
577*e65e5c2dSWyllys Ingersoll KMFOID_SHA256 = { sizeof (OID_SHA256), OID_SHA256},
578*e65e5c2dSWyllys Ingersoll KMFOID_SHA384 = { sizeof (OID_SHA384), OID_SHA384},
579*e65e5c2dSWyllys Ingersoll KMFOID_SHA512 = { sizeof (OID_SHA512), OID_SHA512},
580*e65e5c2dSWyllys Ingersoll KMFOID_MD5 = { sizeof (OID_MD5), OID_MD5};
581