ports/net/sslsniffer/patches/patch-sslsniffer_c

41 lines
1.3 KiB
Text

Fix build with paque EVP_PKEY and squelch a few complier warnings.
Index: sslsniffer.c
--- sslsniffer.c.orig
+++ sslsniffer.c
@@ -1493,7 +1493,7 @@ ProcessCertificateChain(char *buffer, ssl_connection *
q = p;
- cert = d2i_X509(NULL, &q, l); /* grab the current cert */
+ cert = d2i_X509(NULL, (const unsigned char **) &q, l); /* grab the current cert */
if (cert == NULL)
{
@@ -1573,14 +1573,14 @@ PrintCertificateInfo(UTL_CERT_INFO *buf, EVP_PKEY *key
if (key == NULL) return;
- switch (key->type)
+ switch (EVP_PKEY_id(key))
{
case EVP_PKEY_RSA:
- buf->keysize = RSA_size(key->pkey.rsa)*8;
+ buf->keysize = RSA_size(EVP_PKEY_get0_RSA(key))*8;
printf(" RSA Public key size %d bits\n\n",buf->keysize);
break;
case EVP_PKEY_DSA:
- buf->keysize = DSA_size(key->pkey.dsa)*8;
+ buf->keysize = DSA_size(EVP_PKEY_get0_DSA(key))*8;
printf(" DSS Public key size %d bits\n\n",buf->keysize);
break;
default:
@@ -2116,7 +2116,7 @@ ProcessSSLV2ServerHello(ssl_connection *ssl_conn)
*/
/* extract and print out the cert */
- cert = d2i_X509(NULL, (unsigned char **) &cert_data, certificate_len);
+ cert = d2i_X509(NULL, (const unsigned char **) &cert_data, certificate_len);
ProcessCertificate(cert);
ProcessSSLV2CipherSuiteData(cipher_spec_data, cipher_spec_len);