pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/bacula Unbreak it with openssl older than 0.9.9.
details: https://anonhg.NetBSD.org/pkgsrc/rev/39f2d70f9770
branches: trunk
changeset: 395692:39f2d70f9770
user: hasso <hasso%pkgsrc.org@localhost>
date: Fri Jul 10 19:21:28 2009 +0000
description:
Unbreak it with openssl older than 0.9.9.
diffstat:
sysutils/bacula/distinfo | 4 ++--
sysutils/bacula/patches/patch-ab | 22 +++++++++++++++-------
2 files changed, 17 insertions(+), 9 deletions(-)
diffs (57 lines):
diff -r 2876f9e06db6 -r 39f2d70f9770 sysutils/bacula/distinfo
--- a/sysutils/bacula/distinfo Fri Jul 10 19:19:57 2009 +0000
+++ b/sysutils/bacula/distinfo Fri Jul 10 19:21:28 2009 +0000
@@ -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 -r 2876f9e06db6 -r 39f2d70f9770 sysutils/bacula/patches/patch-ab
--- a/sysutils/bacula/patches/patch-ab Fri Jul 10 19:19:57 2009 +0000
+++ b/sysutils/bacula/patches/patch-ab Fri Jul 10 19:21:28 2009 +0000
@@ -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"));
Home |
Main Index |
Thread Index |
Old Index