diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-12-17 02:17:27 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-12-17 02:17:27 +0000 |
| commit | 7863ca30adf7ffdc62315cf73d03e43a65abe078 (patch) | |
| tree | fe6a92950eaf207949bce9dbf2ee539693cf2956 | |
| parent | 37b49c7800343d5b4771de1f61690b6011751119 (diff) | |
Try to fix build with new-ish OpenSSL.1.0
| -rw-r--r-- | src/decrypted_kdm.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/decrypted_kdm.cc b/src/decrypted_kdm.cc index 6147439a..895c6144 100644 --- a/src/decrypted_kdm.cc +++ b/src/decrypted_kdm.cc @@ -153,7 +153,11 @@ DecryptedKDM::DecryptedKDM (EncryptedKDM const & kdm, string private_key) int const decrypted_len = RSA_private_decrypt (cipher_value_len, cipher_value, decrypted, rsa, RSA_PKCS1_OAEP_PADDING); if (decrypted_len == -1) { delete[] decrypted; +#if OPENSSL_VERSION_NUMBER > 0x10100000L + throw KDMDecryptionError (ERR_error_string (ERR_get_error(), 0), cipher_value_len, RSA_bits(rsa)); +#else throw KDMDecryptionError (ERR_error_string (ERR_get_error(), 0), cipher_value_len, rsa->n->dmax); +#endif } unsigned char* p = decrypted; |
