summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/req.c
diff options
context:
space:
mode:
authorsthen <>2014-10-01 13:15:40 +0000
committersthen <>2014-10-01 13:15:40 +0000
commit5c5b544c2aae06ec114cfeaf631cd09a331ce9ea (patch)
tree67663f7db6cba735d8fc6ce3333a938521b78ff7 /src/usr.bin/openssl/req.c
parent4196588ba36e0ba5fa0fcb814fd943e5e3e60b62 (diff)
downloadopenbsd-5c5b544c2aae06ec114cfeaf631cd09a331ce9ea.tar.gz
openbsd-5c5b544c2aae06ec114cfeaf631cd09a331ce9ea.tar.bz2
openbsd-5c5b544c2aae06ec114cfeaf631cd09a331ce9ea.zip
Switch "openssl req" to using SHA256 for hashes and AES256 to encrypt on-disk
keys by default (instead of SHA1/3DES) and update documentation to match. Another way to do this is s/NID_sha1/NID_sha256/ in src/crypto/rsa/rsa_ameth.c ("case ASN1_PKEY_CTRL_DEFAULT_MD_NID") but going with the more targetted method above that only affects "openssl req" for now. Help/OK jsing@. OKs on earlier diffs changing openssl.cnf from phessler@ aja@
Diffstat (limited to 'src/usr.bin/openssl/req.c')
-rw-r--r--src/usr.bin/openssl/req.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/usr.bin/openssl/req.c b/src/usr.bin/openssl/req.c
index 98f3e1d84c..99f10ecde0 100644
--- a/src/usr.bin/openssl/req.c
+++ b/src/usr.bin/openssl/req.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: req.c,v 1.2 2014/08/28 14:23:52 jsing Exp $ */ 1/* $OpenBSD: req.c,v 1.3 2014/10/01 13:15:40 sthen Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -97,7 +97,7 @@
97#define STRING_MASK "string_mask" 97#define STRING_MASK "string_mask"
98#define UTF8_IN "utf8" 98#define UTF8_IN "utf8"
99 99
100#define DEFAULT_KEY_LENGTH 512 100#define DEFAULT_KEY_LENGTH 2048
101#define MIN_KEY_LENGTH 384 101#define MIN_KEY_LENGTH 384
102 102
103 103
@@ -184,9 +184,8 @@ req_main(int argc, char **argv)
184 unsigned long chtype = MBSTRING_ASC; 184 unsigned long chtype = MBSTRING_ASC;
185 185
186 req_conf = NULL; 186 req_conf = NULL;
187#ifndef OPENSSL_NO_DES 187 cipher = EVP_aes_256_cbc();
188 cipher = EVP_des_ede3_cbc(); 188 digest = EVP_sha256();
189#endif
190 189
191 infile = NULL; 190 infile = NULL;
192 outfile = NULL; 191 outfile = NULL;