pkcs10: Support of Microsoft CertTypeExtension

The msCertificateTypeExtension OID (1.3.6.1.4.1.311.20.2) can
be used in a PKCS#10 certificate request to define a certificate
profile. It consists of an UTF8 string.

pki: profile option
This commit is contained in:
Andreas Steffen
2022-08-24 20:46:44 +02:00
parent 8716f7c03c
commit 1ef8b92211
10 changed files with 143 additions and 39 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008 Martin Willi
* Copyright (C) 2016-2019 Andreas Steffen
* Copyright (C) 2016-2022 Andreas Steffen
*
* Copyright (C) secunet Security Networks AG
*
@@ -59,6 +59,7 @@ ENUM(builder_part_names, BUILD_FROM_FILE, BUILD_END,
"BUILD_REVOKED_ENUMERATOR",
"BUILD_BASE_CRL",
"BUILD_CHALLENGE_PWD",
"BUILD_CERT_TYPE_EXT",
"BUILD_PKCS7_ATTRIBUTE",
"BUILD_PKCS11_MODULE",
"BUILD_PKCS11_SLOT",
+3 -1
View File
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008 Martin Willi
* Copyright (C) 2016-2019 Andreas Steffen
* Copyright (C) 2016-2022 Andreas Steffen
*
* Copyright (C) secunet Security Networks AG
*
@@ -127,6 +127,8 @@ enum builder_part_t {
BUILD_BASE_CRL,
/** PKCS#10 challenge password */
BUILD_CHALLENGE_PWD,
/** PKCS#10 certificate type extension */
BUILD_CERT_TYPE_EXT,
/** PKCS#7 attribute, int oid, chunk_t with ASN1 type encoded value */
BUILD_PKCS7_ATTRIBUTE,
/** friendly name of a PKCS#11 module, null terminated char* */
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009 Andreas Steffen
* Copyright (C) 2009-2022 Andreas Steffen
*
* Copyright (C) secunet Security Networks AG
*
@@ -22,6 +22,8 @@
#ifndef PKCS10_H_
#define PKCS10_H_
#include "x509.h"
#include <collections/enumerator.h>
#include <credentials/certificates/certificate.h>
@@ -47,8 +49,15 @@ struct pkcs10_t {
*/
chunk_t (*get_challengePassword)(pkcs10_t *this);
/**
* Get Extended Key Usage (EKU) flags
*
* @return EKU flags
*/
x509_flag_t (*get_flags)(pkcs10_t *this);
/**
* Get.
* Get subjectAltNames
*
* @return enumerator over subjectAltNames as identification_t*
*/