diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-01-22 19:27:13 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-01-22 19:27:13 +0000 |
commit | 2dc7f78169ea4545102b8d9b0604f785cdc798f5 (patch) | |
tree | 916b5f4a06b1f51b6af3e4437ab74e3d27e9cdd9 /crypto/rsa | |
parent | cbbee3a581d0bbf1b738c0805da55a438c265a20 (diff) | |
download | src-2dc7f78169ea4545102b8d9b0604f785cdc798f5.tar.gz src-2dc7f78169ea4545102b8d9b0604f785cdc798f5.zip |
Import OpenSSL 1.0.1f.vendor/openssl/1.0.1f
Approved by: so (delphij), benl (silence)
Notes
Notes:
svn path=/vendor-crypto/openssl/dist/; revision=261035
svn path=/vendor-crypto/openssl/1.0.1f/; revision=261036; tag=vendor/openssl/1.0.1f
Diffstat (limited to 'crypto/rsa')
-rw-r--r-- | crypto/rsa/rsa_ameth.c | 8 | ||||
-rw-r--r-- | crypto/rsa/rsa_chk.c | 6 | ||||
-rw-r--r-- | crypto/rsa/rsa_pmeth.c | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c index 2460910ab278..5a2062f903ae 100644 --- a/crypto/rsa/rsa_ameth.c +++ b/crypto/rsa/rsa_ameth.c @@ -351,27 +351,27 @@ static int rsa_pss_param_print(BIO *bp, RSA_PSS_PARAMS *pss, if (!BIO_indent(bp, indent, 128)) goto err; - if (BIO_puts(bp, "Salt Length: ") <= 0) + if (BIO_puts(bp, "Salt Length: 0x") <= 0) goto err; if (pss->saltLength) { if (i2a_ASN1_INTEGER(bp, pss->saltLength) <= 0) goto err; } - else if (BIO_puts(bp, "20 (default)") <= 0) + else if (BIO_puts(bp, "0x14 (default)") <= 0) goto err; BIO_puts(bp, "\n"); if (!BIO_indent(bp, indent, 128)) goto err; - if (BIO_puts(bp, "Trailer Field: ") <= 0) + if (BIO_puts(bp, "Trailer Field: 0x") <= 0) goto err; if (pss->trailerField) { if (i2a_ASN1_INTEGER(bp, pss->trailerField) <= 0) goto err; } - else if (BIO_puts(bp, "0xbc (default)") <= 0) + else if (BIO_puts(bp, "BC (default)") <= 0) goto err; BIO_puts(bp, "\n"); diff --git a/crypto/rsa/rsa_chk.c b/crypto/rsa/rsa_chk.c index 9d848db8c6c7..cc30e77132fa 100644 --- a/crypto/rsa/rsa_chk.c +++ b/crypto/rsa/rsa_chk.c @@ -59,6 +59,12 @@ int RSA_check_key(const RSA *key) BN_CTX *ctx; int r; int ret=1; + + if (!key->p || !key->q || !key->n || !key->e || !key->d) + { + RSAerr(RSA_F_RSA_CHECK_KEY, RSA_R_VALUE_MISSING); + return 0; + } i = BN_new(); j = BN_new(); diff --git a/crypto/rsa/rsa_pmeth.c b/crypto/rsa/rsa_pmeth.c index 5b2ecf56adc7..157aa5c41d2a 100644 --- a/crypto/rsa/rsa_pmeth.c +++ b/crypto/rsa/rsa_pmeth.c @@ -611,6 +611,8 @@ static int pkey_rsa_ctrl_str(EVP_PKEY_CTX *ctx, pm = RSA_NO_PADDING; else if (!strcmp(value, "oeap")) pm = RSA_PKCS1_OAEP_PADDING; + else if (!strcmp(value, "oaep")) + pm = RSA_PKCS1_OAEP_PADDING; else if (!strcmp(value, "x931")) pm = RSA_X931_PADDING; else if (!strcmp(value, "pss")) |