diff options
| author | Matthew Garrett <mjg@redhat.com> | 2012-07-02 12:33:42 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2012-07-02 12:33:42 -0400 |
| commit | d259b1406044b430fe5786cd57e272bb9c57166d (patch) | |
| tree | 308e31c8b7338e11843ac324ce20b89d765c3f45 /Cryptlib/OpenSSL/crypto/rsa/rsa_sign.c | |
| parent | 20094cb55d476c5d053cc73cec6e0d3f2a1c8d9a (diff) | |
| download | efi-boot-shim-d259b1406044b430fe5786cd57e272bb9c57166d.tar.gz efi-boot-shim-d259b1406044b430fe5786cd57e272bb9c57166d.zip | |
Update OpenSSL
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/rsa/rsa_sign.c')
| -rwxr-xr-x | Cryptlib/OpenSSL/crypto/rsa/rsa_sign.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Cryptlib/OpenSSL/crypto/rsa/rsa_sign.c b/Cryptlib/OpenSSL/crypto/rsa/rsa_sign.c index 5488c06f..743dfd76 100755 --- a/Cryptlib/OpenSSL/crypto/rsa/rsa_sign.c +++ b/Cryptlib/OpenSSL/crypto/rsa/rsa_sign.c @@ -137,7 +137,12 @@ int RSA_sign(int type, const unsigned char *m, unsigned int m_len, i2d_X509_SIG(&sig,&p); s=tmps; } +#ifdef OPENSSL_FIPS + /* Bypass algorithm blocking: this is allowed if we get this far */ + i=rsa->meth->rsa_priv_enc(i,s,sigret,rsa,RSA_PKCS1_PADDING); +#else i=RSA_private_encrypt(i,s,sigret,rsa,RSA_PKCS1_PADDING); +#endif if (i <= 0) ret=0; else @@ -190,8 +195,11 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, RSAerr(RSA_F_RSA_VERIFY, RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE); return 0; } -#endif + /* Bypass algorithm blocking: this is allowed */ + i=rsa->meth->rsa_pub_dec((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING); +#else i=RSA_public_decrypt((int)siglen,sigbuf,s,rsa,RSA_PKCS1_PADDING); +#endif if (i <= 0) goto err; |
