42 lines
1.6 KiB
Diff
42 lines
1.6 KiB
Diff
diff -up bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c.openssl bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c
|
|
--- bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c.openssl 2008-11-06 20:10:08.000000000 +0100
|
|
+++ bacula-3.0.2/bacula-3.0.2/src/lib/crypto.c 2009-08-22 12:48:20.000000000 +0200
|
|
@@ -309,7 +309,11 @@ typedef struct PEM_CB_Context {
|
|
*/
|
|
static ASN1_OCTET_STRING *openssl_cert_keyid(X509 *cert) {
|
|
X509_EXTENSION *ext;
|
|
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
|
|
X509V3_EXT_METHOD *method;
|
|
+#else
|
|
+ const X509V3_EXT_METHOD *method;
|
|
+#endif
|
|
ASN1_OCTET_STRING *keyid;
|
|
int i;
|
|
#if (OPENSSL_VERSION_NUMBER >= 0x0090800FL)
|
|
@@ -973,6 +977,10 @@ void crypto_sign_free(SIGNATURE *sig)
|
|
free (sig);
|
|
}
|
|
|
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
|
+#define EVP_PKEY_decrypt EVP_PKEY_decrypt_old
|
|
+#define EVP_PKEY_encrypt EVP_PKEY_encrypt_old
|
|
+#endif
|
|
/*
|
|
* Create a new encryption session.
|
|
* Returns: A pointer to a CRYPTO_SESSION object on success.
|
|
diff -up bacula-3.0.2/bacula-3.0.2/src/lib/tls.c.openssl bacula-3.0.2/bacula-3.0.2/src/lib/tls.c
|
|
--- bacula-3.0.2/bacula-3.0.2/src/lib/tls.c.openssl 2008-11-22 19:36:12.000000000 +0100
|
|
+++ bacula-3.0.2/bacula-3.0.2/src/lib/tls.c 2009-08-22 15:24:30.000000000 +0200
|
|
@@ -315,7 +315,11 @@ bool tls_postconnect_verify_host(JCR *jc
|
|
extname = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));
|
|
|
|
if (strcmp(extname, "subjectAltName") == 0) {
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
|
|
+ const X509V3_EXT_METHOD *method;
|
|
+#else
|
|
X509V3_EXT_METHOD *method;
|
|
+#endif
|
|
STACK_OF(CONF_VALUE) *val;
|
|
CONF_VALUE *nval;
|
|
void *extstr = NULL;
|