apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r597887 - in /apr/apr-util/trunk: include/apr_ssl.h ssl/apr_ssl_openssl.c ssl/apr_ssl_winsock.c
Date Sat, 24 Nov 2007 17:02:59 GMT
Author: minfrin
Date: Sat Nov 24 09:02:58 2007
New Revision: 597887

URL: http://svn.apache.org/viewvc?rev=597887&view=rev
Log:
Expose the crypto init procedure in the API. Remove a stray
OpenSSL_add_all_digests().

Modified:
    apr/apr-util/trunk/include/apr_ssl.h
    apr/apr-util/trunk/ssl/apr_ssl_openssl.c
    apr/apr-util/trunk/ssl/apr_ssl_winsock.c

Modified: apr/apr-util/trunk/include/apr_ssl.h
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/include/apr_ssl.h?rev=597887&r1=597886&r2=597887&view=diff
==============================================================================
--- apr/apr-util/trunk/include/apr_ssl.h (original)
+++ apr/apr-util/trunk/include/apr_ssl.h Sat Nov 24 09:02:58 2007
@@ -58,6 +58,12 @@
 typedef struct apr_ssl_socket    apr_ssl_socket_t;
 
 /**
+ * @brief Initialise the underlying SSL implementation in use.
+ * @return APR_NOTIMPL in case of no crypto support.
+ */
+APU_DECLARE(apr_status_t) apr_ssl_init(void);
+
+/**
  * @brief Attempts to create an SSL "factory". The "factory" is then 
  *        used to create sockets.
  * @param newFactory The newly created factory
@@ -258,6 +264,12 @@
  * Structure for referencing an EVP PKEY context.
  */
 typedef struct apu_evp_crypt     apr_evp_crypt_t;
+
+/**
+ * @brief Initialise the underlying crypto implementation in use.
+ * @return APR_NOTIMPL in case of no crypto support.
+ */
+APU_DECLARE(apr_status_t) apr_evp_init(void);
 
 /**
  * @brief Attempts to create an EVP "factory". The "factory" is then 

Modified: apr/apr-util/trunk/ssl/apr_ssl_openssl.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/ssl/apr_ssl_openssl.c?rev=597887&r1=597886&r2=597887&view=diff
==============================================================================
--- apr/apr-util/trunk/ssl/apr_ssl_openssl.c (original)
+++ apr/apr-util/trunk/ssl/apr_ssl_openssl.c Sat Nov 24 09:02:58 2007
@@ -35,7 +35,7 @@
 #include "apr_ssl_private.h"
 #include "apr_ssl_openssl_private.h"
 
-apr_status_t apu_ssl_init(void)
+APU_DECLARE(apr_status_t) apr_ssl_init(void)
 {
     CRYPTO_malloc_init();
     SSL_load_error_strings();
@@ -293,6 +293,11 @@
     return apr_evp_factory_cleanup(f);
 }
 
+APU_DECLARE(apr_status_t) apr_evp_init(void)
+{
+    return apr_ssl_init();
+}
+
 APU_DECLARE(apr_status_t) apr_evp_factory_create(apr_evp_factory_t **newFactory,
                                                  const char *privateKeyFn, 
                                                  const char *certFn, 
@@ -354,7 +359,6 @@
             if (!data->cipher) {
                 return APR_ENOCIPHER;
             }
-            OpenSSL_add_all_digests();
             data->md = EVP_get_digestbyname(digest);
             if (!data->md) {
                 return APR_ENODIGEST;

Modified: apr/apr-util/trunk/ssl/apr_ssl_winsock.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/ssl/apr_ssl_winsock.c?rev=597887&r1=597886&r2=597887&view=diff
==============================================================================
--- apr/apr-util/trunk/ssl/apr_ssl_winsock.c (original)
+++ apr/apr-util/trunk/ssl/apr_ssl_winsock.c Sat Nov 24 09:02:58 2007
@@ -35,7 +35,7 @@
 #include "apr_ssl_private.h"
 #include "apr_ssl_winsock_private.h"
 
-APU_DECLARE(apr_status_t) apu_ssl_init(void)
+APU_DECLARE(apr_status_t) apr_ssl_init(void)
 {
     return APR_SUCCESS;
 }
@@ -253,6 +253,11 @@
 }
 
 APU_DECLARE(apr_status_t) apr_evp_factory_cleanup(apr_evp_factory_t *f)
+{
+    return APR_ENOTIMPL;
+}
+
+APU_DECLARE(apr_status_t) apr_evp_init(void)
 {
     return APR_ENOTIMPL;
 }



Mime
View raw message