allow choice of digest algorithm in certificate generation
This commit is contained in:
@@ -36,6 +36,7 @@ ENUM(builder_part_names, BUILD_FROM_FILE, BUILD_END,
|
||||
"BUILD_NOT_BEFORE_TIME",
|
||||
"BUILD_NOT_AFTER_TIME",
|
||||
"BUILD_SERIAL",
|
||||
"BUILD_DIGEST_ALG",
|
||||
"BUILD_IETF_GROUP_ATTR",
|
||||
"BUILD_CA_CERT",
|
||||
"BUILD_CERT",
|
||||
|
||||
@@ -80,6 +80,8 @@ enum builder_part_t {
|
||||
BUILD_NOT_AFTER_TIME,
|
||||
/** a serial number in binary form, chunk_t */
|
||||
BUILD_SERIAL,
|
||||
/** digest algorithm to be used for signature, int */
|
||||
BUILD_DIGEST_ALG,
|
||||
/** a comma-separated list of ietf group attributes, char* */
|
||||
BUILD_IETF_GROUP_ATTR,
|
||||
/** a ca certificate, certificate_t* */
|
||||
|
||||
@@ -198,6 +198,9 @@ static void* create(private_credential_factory_t *this, credential_type_t type,
|
||||
case BUILD_FROM_FD:
|
||||
builder->add(builder, part, va_arg(args, u_int));
|
||||
continue;
|
||||
case BUILD_DIGEST_ALG:
|
||||
builder->add(builder, part, va_arg(args, int));
|
||||
continue;
|
||||
case BUILD_NOT_BEFORE_TIME:
|
||||
case BUILD_NOT_AFTER_TIME:
|
||||
builder->add(builder, part, va_arg(args, time_t));
|
||||
|
||||
Reference in New Issue
Block a user