From: Martin Willi Date: Mon, 19 Jul 2010 11:16:32 +0000 (+0200) Subject: Use a dedicated build part for challenge passwords, BUILD_PASSPHRASE gets obsolete X-Git-Tag: 4.5.0~595 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3429be9514c2568ccf2eb3df6ffc7bc7646e7d4f;p=thirdparty%2Fstrongswan.git Use a dedicated build part for challenge passwords, BUILD_PASSPHRASE gets obsolete --- diff --git a/src/libstrongswan/credentials/builder.c b/src/libstrongswan/credentials/builder.c index ab7f2b5796..c43e5fd5d1 100644 --- a/src/libstrongswan/credentials/builder.c +++ b/src/libstrongswan/credentials/builder.c @@ -45,6 +45,7 @@ ENUM(builder_part_names, BUILD_FROM_FILE, BUILD_END, "BUILD_PATHLEN", "BUILD_X509_FLAG", "BUILD_REVOKED_ENUMERATOR", + "BUILD_CHALLENGE_PWD", "BUILD_PKCS11_MODULE", "BUILD_PKCS11_SLOT", "BUILD_PKCS11_KEYID", diff --git a/src/libstrongswan/credentials/builder.h b/src/libstrongswan/credentials/builder.h index 24d8ce8703..996ce83621 100644 --- a/src/libstrongswan/credentials/builder.h +++ b/src/libstrongswan/credentials/builder.h @@ -103,6 +103,8 @@ enum builder_part_t { BUILD_X509_FLAG, /** enumerator_t over (chunk_t serial, time_t date, crl_reason_t reason) */ BUILD_REVOKED_ENUMERATOR, + /** PKCS#10 challenge password */ + BUILD_CHALLENGE_PWD, /** friendly name of a PKCS#11 module, null terminated char* */ BUILD_PKCS11_MODULE, /** slot specifier for a token in a PKCS#11 module, int */ diff --git a/src/libstrongswan/plugins/x509/x509_pkcs10.c b/src/libstrongswan/plugins/x509/x509_pkcs10.c index bfb0ca621b..7b488484ea 100644 --- a/src/libstrongswan/plugins/x509/x509_pkcs10.c +++ b/src/libstrongswan/plugins/x509/x509_pkcs10.c @@ -684,7 +684,7 @@ x509_pkcs10_t *x509_pkcs10_gen(certificate_type_t type, va_list args) enumerator->destroy(enumerator); continue; } - case BUILD_PASSPHRASE: + case BUILD_CHALLENGE_PWD: cert->challengePassword = chunk_clone(va_arg(args, chunk_t)); continue; case BUILD_DIGEST_ALG: diff --git a/src/pki/commands/req.c b/src/pki/commands/req.c index a1ae2f515e..d1ca45e1a6 100644 --- a/src/pki/commands/req.c +++ b/src/pki/commands/req.c @@ -127,7 +127,7 @@ static int req() BUILD_SIGNING_KEY, private, BUILD_SUBJECT, id, BUILD_SUBJECT_ALTNAMES, san, - BUILD_PASSPHRASE, challenge_password, + BUILD_CHALLENGE_PWD, challenge_password, BUILD_DIGEST_ALG, digest, BUILD_END); if (!cert) diff --git a/src/scepclient/scepclient.c b/src/scepclient/scepclient.c index 5c32bbdefb..b7d029f2d1 100644 --- a/src/scepclient/scepclient.c +++ b/src/scepclient/scepclient.c @@ -859,7 +859,7 @@ int main(int argc, char **argv) BUILD_SIGNING_KEY, private_key, BUILD_SUBJECT, subject, BUILD_SUBJECT_ALTNAMES, subjectAltNames, - BUILD_PASSPHRASE, challengePassword, + BUILD_CHALLENGE_PWD, challengePassword, BUILD_DIGEST_ALG, pkcs10_signature_alg, BUILD_END); if (!pkcs10_req)