Commit baa98c3a authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Joe strongly objected to this outgoing style; use this incoming
  style for const modifiers so the reader can still follow that
  the data is [const] unsigned char *

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@209795 13f79535-47bb-0310-9956-ffa450edef68
parent f8b5b3fc
Loading
Loading
Loading
Loading
+2 −12
Changes for modules/ssl/ssl_engine_init.c: 2 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -719,12 +719,7 @@ static int ssl_server_import_cert(server_rec *s,
{
    SSLModConfigRec *mc = myModConfig(s);
    ssl_asn1_t *asn1;
#ifdef OPENSSL_VERSION_NUMBER
#if (OPENSSL_VERSION_NUMBER >= 0x00908000)
    const /* ...shifting sands of openssl... */
#endif
#endif
        unsigned char *ptr;
    MODSSL_D2I_X509_CONST unsigned char *ptr;
    const char *type = ssl_asn1_keystr(idx);
    X509 *cert;

@@ -762,12 +757,7 @@ static int ssl_server_import_key(server_rec *s,
{
    SSLModConfigRec *mc = myModConfig(s);
    ssl_asn1_t *asn1;
#ifdef OPENSSL_VERSION_NUMBER
#if (OPENSSL_VERSION_NUMBER >= 0x00908000)
    const /* ...shifting sands of openssl... */
#endif
#endif
        unsigned char *ptr;
    MODSSL_D2I_PrivateKey_CONST unsigned char *ptr;
    const char *type = ssl_asn1_keystr(idx);
    int pkey_type = (idx == SSL_AIDX_RSA) ? EVP_PKEY_RSA : EVP_PKEY_DSA;
    EVP_PKEY *pkey;
+1 −6
Changes for modules/ssl/ssl_scache_dbm.c: 1 added line, 6 removed lines.
Original line number Diff line number Diff line
@@ -196,12 +196,7 @@ SSL_SESSION *ssl_scache_dbm_retrieve(server_rec *s, UCHAR *id, int idlen)
    apr_datum_t dbmkey;
    apr_datum_t dbmval;
    SSL_SESSION *sess = NULL;
#ifdef OPENSSL_VERSION_NUMBER
#if (OPENSSL_VERSION_NUMBER >= 0x0090707f)
    const /* ...shifting sands of openssl... */
#endif
#endif
        unsigned char *ucpData;
    MODSSL_D2I_SSL_SESSION_CONST unsigned char *ucpData;
    int nData;
    time_t expiry;
    time_t now;
+2 −12
Changes for modules/ssl/ssl_scache_shmcb.c: 2 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -1184,12 +1184,7 @@ static SSL_SESSION *shmcb_lookup_session_id(
    SHMCBHeader *header;
    SSL_SESSION *pSession = NULL;
    unsigned int curr_pos, loop, count;
#ifdef OPENSSL_VERSION_NUMBER
#if (OPENSSL_VERSION_NUMBER >= 0x0090707f)
    const /* ...shifting sands of openssl... */
#endif
#endif
        unsigned char *ptr;
    MODSSL_D2I_SSL_SESSION_CONST unsigned char *ptr;
    time_t now;

    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
@@ -1267,12 +1262,7 @@ static BOOL shmcb_remove_session_id(
    SHMCBIndex *idx;
    SHMCBHeader *header;
    unsigned int curr_pos, loop, count;
#ifdef OPENSSL_VERSION_NUMBER
#if (OPENSSL_VERSION_NUMBER >= 0x0090707f)
    const /* ...shifting sands of openssl... */
#endif
#endif
        unsigned char *ptr;
    MODSSL_D2I_SSL_SESSION_CONST unsigned char *ptr;
    BOOL to_return = FALSE;

    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+18 −0
Changes for modules/ssl/ssl_toolkit_compat.h: 18 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -85,6 +85,21 @@
#define MODSSL_CLIENT_CERT_CB_ARG_TYPE X509
#define MODSSL_PCHAR_CAST

/* ...shifting sands of openssl... */
#if (OPENSSL_VERSION_NUMBER >= 0x0090707f)
# define MODSSL_D2I_SSL_SESSION_CONST    const
#else
# define MODSSL_D2I_SSL_SESSION_CONST
#endif

#if (OPENSSL_VERSION_NUMBER >= 0x00908000)
# define MODSSL_D2I_PrivateKey_CONST const
# define MODSSL_D2I_X509_CONST const
#else
# define MODSSL_D2I_PrivateKey_CONST
# define MODSSL_D2I_X509_CONST
#endif

#define modssl_X509_verify_cert X509_verify_cert

typedef int (modssl_read_bio_cb_fn)(char*,int,int,void*);
@@ -146,6 +161,9 @@ typedef int (modssl_read_bio_cb_fn)(char*,int,int,void*);
#define MODSSL_INFO_CB_ARG_TYPE SSL*
#define MODSSL_CLIENT_CERT_CB_ARG_TYPE void
#define MODSSL_PCHAR_CAST (char *)
#define MODSSL_D2I_SSL_SESSION_CONST
#define MODSSL_D2I_PrivateKey_CONST
#define MODSSL_D2I_X509_CONST

typedef int (modssl_read_bio_cb_fn)(char*,int,int);