c067a81dbe
Similar diff from benoit@ on ports..
59 lines
3.3 KiB
Plaintext
59 lines
3.3 KiB
Plaintext
$OpenBSD: patch-kio_kssl_kopenssl_cc,v 1.3 2010/10/06 08:13:32 landry Exp $
|
|
--- kio/kssl/kopenssl.cc.orig Sat Jul 22 10:16:39 2006
|
|
+++ kio/kssl/kopenssl.cc Sun Oct 3 19:52:18 2010
|
|
@@ -96,9 +96,8 @@ static int (*K_BIO_write) (BIO *b, const void *data,
|
|
static int (*K_PEM_ASN1_write_bio) (int (*)(),const char *,BIO *,char *,
|
|
const EVP_CIPHER *,unsigned char *,int ,
|
|
pem_password_cb *, void *) = 0L;
|
|
-static ASN1_METHOD* (*K_X509_asn1_meth) (void) = 0L;
|
|
-static int (*K_ASN1_i2d_fp)(int (*)(),FILE *,unsigned char *) = 0L;
|
|
-static int (*K_i2d_ASN1_HEADER)(ASN1_HEADER *, unsigned char **) = 0L;
|
|
+static int (*K_ASN1_item_i2d_fp)(ASN1_ITEM *,FILE *,unsigned char *) = 0L;
|
|
+static ASN1_ITEM *K_NETSCAPE_X509_it = 0L;
|
|
static int (*K_X509_print_fp) (FILE *, X509*) = 0L;
|
|
static int (*K_i2d_PKCS12) (PKCS12*, unsigned char**) = 0L;
|
|
static int (*K_i2d_PKCS12_fp) (FILE *, PKCS12*) = 0L;
|
|
@@ -404,9 +403,8 @@ KConfig *cfg;
|
|
K_BIO_ctrl = (long (*) (BIO *,int,long,void *)) _cryptoLib->symbol("BIO_ctrl");
|
|
K_BIO_write = (int (*) (BIO *b, const void *data, int len)) _cryptoLib->symbol("BIO_write");
|
|
K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *,BIO*, char*, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) _cryptoLib->symbol("PEM_ASN1_write_bio");
|
|
- K_X509_asn1_meth = (ASN1_METHOD* (*)(void)) _cryptoLib->symbol("X509_asn1_meth");
|
|
- K_ASN1_i2d_fp = (int (*)(int (*)(), FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_i2d_fp");
|
|
- K_i2d_ASN1_HEADER = (int (*)(ASN1_HEADER *, unsigned char **)) _cryptoLib->symbol("i2d_ASN1_HEADER");
|
|
+ K_ASN1_item_i2d_fp = (int (*)(ASN1_ITEM *, FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_item_i2d_fp");
|
|
+ K_NETSCAPE_X509_it = (ASN1_ITEM *) _cryptoLib->symbol("NETSCAPE_X509_it");
|
|
K_X509_print_fp = (int (*)(FILE*, X509*)) _cryptoLib->symbol("X509_print_fp");
|
|
K_i2d_PKCS12 = (int (*)(PKCS12*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS12");
|
|
K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12*)) _cryptoLib->symbol("i2d_PKCS12_fp");
|
|
@@ -568,7 +566,7 @@ KConfig *cfg;
|
|
K_SSL_set_session = (int (*)(SSL*,SSL_SESSION*)) _sslLib->symbol("SSL_set_session");
|
|
K_d2i_SSL_SESSION = (SSL_SESSION* (*)(SSL_SESSION**,unsigned char**, long)) _sslLib->symbol("d2i_SSL_SESSION");
|
|
K_i2d_SSL_SESSION = (int (*)(SSL_SESSION*,unsigned char**)) _sslLib->symbol("i2d_SSL_SESSION");
|
|
- K_SSL_get_ciphers = (STACK *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
|
|
+ K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
|
|
#endif
|
|
|
|
|
|
@@ -956,19 +954,11 @@ int KOpenSSLProxy::PEM_write_bio_X509(BIO *bp, X509 *x
|
|
else return -1;
|
|
}
|
|
|
|
-
|
|
-ASN1_METHOD *KOpenSSLProxy::X509_asn1_meth(void) {
|
|
- if (K_X509_asn1_meth) return (K_X509_asn1_meth)();
|
|
- else return 0L;
|
|
-}
|
|
-
|
|
-
|
|
int KOpenSSLProxy::ASN1_i2d_fp(FILE *out,unsigned char *x) {
|
|
- if (K_ASN1_i2d_fp && K_i2d_ASN1_HEADER)
|
|
- return (K_ASN1_i2d_fp)((int (*)())K_i2d_ASN1_HEADER, out, x);
|
|
+ if (K_ASN1_item_i2d_fp && K_NETSCAPE_X509_it)
|
|
+ return (K_ASN1_item_i2d_fp)(K_NETSCAPE_X509_it, out, x);
|
|
else return -1;
|
|
}
|
|
-
|
|
|
|
int KOpenSSLProxy::X509_print(FILE *fp, X509 *x) {
|
|
if (K_X509_print_fp) return (K_X509_print_fp)(fp, x);
|