diff options
author | hasso <hasso@pkgsrc.org> | 2009-07-10 19:21:28 +0000 |
---|---|---|
committer | hasso <hasso@pkgsrc.org> | 2009-07-10 19:21:28 +0000 |
commit | c84f32a67c9ed704fe1d9fda2f4583b46de00244 (patch) | |
tree | a6126fde650469fbf788ebd1ca6baee17ea96cc9 /sysutils/bacula | |
parent | 477a5016d45075e40fd1e705db25135ba07f7f87 (diff) | |
download | pkgsrc-c84f32a67c9ed704fe1d9fda2f4583b46de00244.tar.gz |
Unbreak it with openssl older than 0.9.9.
Diffstat (limited to 'sysutils/bacula')
-rw-r--r-- | sysutils/bacula/distinfo | 4 | ||||
-rw-r--r-- | sysutils/bacula/patches/patch-ab | 22 |
2 files changed, 17 insertions, 9 deletions
diff --git a/sysutils/bacula/distinfo b/sysutils/bacula/distinfo index b454d3f9ef9..113fb640813 100644 --- a/sysutils/bacula/distinfo +++ b/sysutils/bacula/distinfo @@ -1,10 +1,10 @@ -$NetBSD: distinfo,v 1.34 2009/05/16 08:06:56 adam Exp $ +$NetBSD: distinfo,v 1.35 2009/07/10 19:21:28 hasso Exp $ SHA1 (bacula-3.0.1.tar.gz) = 073d3d9458b51b928c0b5f8cf830c94362366c9a RMD160 (bacula-3.0.1.tar.gz) = 8f23238a7475fb1d3371e583d43fbd6f49efc113 Size (bacula-3.0.1.tar.gz) = 3842746 bytes SHA1 (patch-aa) = e59bccdc80b23b2a64bd7e4f2bbefe22e019fca8 -SHA1 (patch-ab) = 760c5214dc9a4e4c11e812842e790b973c502c1a +SHA1 (patch-ab) = ae9df9398fbcd4669f513613eb11910aa5b9e370 SHA1 (patch-ac) = db88570ebbed0e624315b6eb4668ff97b6b180b6 SHA1 (patch-ad) = 6a739f6960da444d30df8ffd49cb258446e06797 SHA1 (patch-ae) = 1b4d6fdeb8570be9f7e5f0355701d92d81f68b07 diff --git a/sysutils/bacula/patches/patch-ab b/sysutils/bacula/patches/patch-ab index d369e40e216..25916baca7a 100644 --- a/sysutils/bacula/patches/patch-ab +++ b/sysutils/bacula/patches/patch-ab @@ -1,22 +1,30 @@ -$NetBSD: patch-ab,v 1.3 2008/11/28 13:47:51 adam Exp $ +$NetBSD: patch-ab,v 1.4 2009/07/10 19:21:28 hasso Exp $ ---- src/lib/crypto.c.orig 2008-11-28 13:50:13.000000000 +0100 -+++ src/lib/crypto.c -@@ -1099,7 +1099,7 @@ CRYPTO_SESSION *crypto_session_new (cryp +--- ./src/lib/crypto.c.orig 2008-11-06 21:10:08 +0200 ++++ ./src/lib/crypto.c 2009-07-10 13:27:39 +0300 +@@ -1099,7 +1099,11 @@ CRYPTO_SESSION *crypto_session_new (cryp /* Encrypt the session key */ ekey = (unsigned char *)malloc(EVP_PKEY_size(keypair->pubkey)); -- if ((ekey_len = EVP_PKEY_encrypt(ekey, cs->session_key, cs->session_key_len, keypair->pubkey)) <= 0) { ++#if OPENSSL_VERSION_NUMBER >= 0x00909000L + if ((ekey_len = EVP_PKEY_encrypt_old(ekey, cs->session_key, cs->session_key_len, keypair->pubkey)) <= 0) { ++#else + if ((ekey_len = EVP_PKEY_encrypt(ekey, cs->session_key, cs->session_key_len, keypair->pubkey)) <= 0) { ++#endif /* OpenSSL failure */ RecipientInfo_free(ri); crypto_session_free(cs); -@@ -1222,7 +1222,7 @@ crypto_error_t crypto_session_decode(con +@@ -1222,8 +1226,13 @@ crypto_error_t crypto_session_decode(con /* Decrypt the session key */ /* Allocate sufficient space for the largest possible decrypted data */ cs->session_key = (unsigned char *)malloc(EVP_PKEY_size(keypair->privkey)); -- cs->session_key_len = EVP_PKEY_decrypt(cs->session_key, M_ASN1_STRING_data(ri->encryptedKey), ++#if OPENSSL_VERSION_NUMBER >= 0x00909000L + cs->session_key_len = EVP_PKEY_decrypt_old(cs->session_key, M_ASN1_STRING_data(ri->encryptedKey), ++ M_ASN1_STRING_length(ri->encryptedKey), keypair->privkey); ++#else + cs->session_key_len = EVP_PKEY_decrypt(cs->session_key, M_ASN1_STRING_data(ri->encryptedKey), M_ASN1_STRING_length(ri->encryptedKey), keypair->privkey); ++#endif if (cs->session_key_len <= 0) { + openssl_post_errors(M_ERROR, _("Failure decrypting the session key")); |