diff options
| author | sthen <> | 2014-10-01 13:15:40 +0000 |
|---|---|---|
| committer | sthen <> | 2014-10-01 13:15:40 +0000 |
| commit | 6999bb74c7c7a3e4d8c4a9f510bdf86ec39f2740 (patch) | |
| tree | 67663f7db6cba735d8fc6ce3333a938521b78ff7 /src/usr.bin/openssl/req.c | |
| parent | dc535afb800e7778925e89258237423816c4f4f8 (diff) | |
| download | openbsd-6999bb74c7c7a3e4d8c4a9f510bdf86ec39f2740.tar.gz openbsd-6999bb74c7c7a3e4d8c4a9f510bdf86ec39f2740.tar.bz2 openbsd-6999bb74c7c7a3e4d8c4a9f510bdf86ec39f2740.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 '')
| -rw-r--r-- | src/usr.bin/openssl/req.c | 9 |
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; |
