aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-07-19 13:16:32 +0200
committerMartin Willi <martin@revosec.ch>2010-08-04 09:26:21 +0200
commit3429be9514c2568ccf2eb3df6ffc7bc7646e7d4f (patch)
tree4924a6b3c2c16c3b0b9d9aaa8937dd527727d071 /src
parent0556667dcafd30e47150395861aebfddd751816b (diff)
downloadstrongswan-3429be9514c2568ccf2eb3df6ffc7bc7646e7d4f.tar.bz2
strongswan-3429be9514c2568ccf2eb3df6ffc7bc7646e7d4f.tar.xz
Use a dedicated build part for challenge passwords, BUILD_PASSPHRASE gets obsolete
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/credentials/builder.c1
-rw-r--r--src/libstrongswan/credentials/builder.h2
-rw-r--r--src/libstrongswan/plugins/x509/x509_pkcs10.c2
-rw-r--r--src/pki/commands/req.c2
-rw-r--r--src/scepclient/scepclient.c2
5 files changed, 6 insertions, 3 deletions
diff --git a/src/libstrongswan/credentials/builder.c b/src/libstrongswan/credentials/builder.c
index ab7f2b579..c43e5fd5d 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 24d8ce870..996ce8362 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 bfb0ca621..7b488484e 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 a1ae2f515..d1ca45e1a 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 5c32bbdef..b7d029f2d 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)