From 7d87fe7aa5df77714648a26d456e30f14fdeee65 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 19 Aug 2009 16:33:11 +0000 Subject: [PATCH] Remove the const qualifier from the SSL pointer returned from nse_nsock_get_ssl. In older versions of OpenSSL (I don't know how old) the argument to SSL_get_peer_certificate is not const and it caused a compiler error reported by Ron Bowes. --- nse_nsock.cc | 2 +- nse_ssl_cert.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nse_nsock.cc b/nse_nsock.cc index d2b29650b..e0a16f881 100644 --- a/nse_nsock.cc +++ b/nse_nsock.cc @@ -1744,7 +1744,7 @@ int ncap_restore_lua(ncap_request * nr) } #if HAVE_OPENSSL -const SSL *nse_nsock_get_ssl(lua_State *L) +SSL *nse_nsock_get_ssl(lua_State *L) { const l_nsock_udata *udata; diff --git a/nse_ssl_cert.cc b/nse_ssl_cert.cc index 818b657ed..1417d5bc5 100644 --- a/nse_ssl_cert.cc +++ b/nse_ssl_cert.cc @@ -112,7 +112,7 @@ struct cert_userdata { int attributes_table; }; -const SSL *nse_nsock_get_ssl(lua_State *L); +SSL *nse_nsock_get_ssl(lua_State *L); /* This is a reference to a table that will be used as the metatable for certificate attribute tables. It has an __index entry that points to the @@ -367,7 +367,7 @@ static void cert_pem_to_string(lua_State *L, X509 *cert) int l_get_ssl_certificate(lua_State *L) { - const SSL *ssl; + SSL *ssl; struct cert_userdata *udata; X509 *cert; X509_NAME *subject, *issuer;