aboutsummaryrefslogtreecommitdiffstats
path: root/src/pki/commands/req.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-03-16 18:25:22 +0100
committerTobias Brunner <tobias@strongswan.org>2015-03-23 17:22:31 +0100
commitae0604f58334c72f9969fdc1a6425adb948da0e9 (patch)
tree13a634c61a531391a93e8de6d4aca385ba0899a1 /src/pki/commands/req.c
parent7fa03b308cb73c68ea7e944fcbc19073d3a3f5fa (diff)
downloadstrongswan-ae0604f58334c72f9969fdc1a6425adb948da0e9.tar.bz2
strongswan-ae0604f58334c72f9969fdc1a6425adb948da0e9.tar.xz
pki: Use SHA-256 as default for signatures
Since the BLISS private key supports this we don't do any special handling anymore (if the user choses a digest that is not supported, signing will simply fail later because no signature scheme will be found).
Diffstat (limited to 'src/pki/commands/req.c')
-rw-r--r--src/pki/commands/req.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/pki/commands/req.c b/src/pki/commands/req.c
index 39d71626d..13ef1c9d8 100644
--- a/src/pki/commands/req.c
+++ b/src/pki/commands/req.c
@@ -31,7 +31,7 @@ static int req()
{
cred_encoding_type_t form = CERT_ASN1_DER;
key_type_t type = KEY_RSA;
- hash_algorithm_t digest = HASH_SHA1;
+ hash_algorithm_t digest = HASH_SHA256;
certificate_t *cert = NULL;
private_key_t *private = NULL;
char *file = NULL, *dn = NULL, *error = NULL;
@@ -103,14 +103,6 @@ static int req()
break;
}
- if (type == KEY_BLISS)
- {
- /* the default hash function is SHA512. SHA1 is not supported */
- if (digest == HASH_SHA1)
- {
- digest = HASH_SHA512;
- }
- }
if (!dn)
{
error = "--dn is required";
@@ -208,7 +200,7 @@ static void __attribute__ ((constructor))reg()
{"dn", 'd', 1, "subject distinguished name"},
{"san", 'a', 1, "subjectAltName to include in cert request"},
{"password",'p', 1, "challengePassword to include in cert request"},
- {"digest", 'g', 1, "digest for signature creation, default: sha1"},
+ {"digest", 'g', 1, "digest for signature creation, default: sha256"},
{"outform", 'f', 1, "encoding of generated request, default: der"},
}
});