apr_datum_t dbmkey;
apr_datum_t dbmval;
SSL_SESSION *sess = NULL;
- UCHAR *ucpData;
+ MODSSL_D2I_DATUM_TYPE ucpData;
int nData;
time_t expiry;
time_t now;
/* parse resulting data */
nData = dbmval.dsize-sizeof(time_t);
- ucpData = (UCHAR *)malloc(nData);
+ ucpData = malloc(nData);
if (ucpData == NULL) {
apr_dbm_close(dbm);
ssl_mutex_off(s);
return NULL;
}
- memcpy(ucpData, (char *)dbmval.dptr+sizeof(time_t), nData);
+ /* Cast needed, ucpData may be const */
+ memcpy((UCHAR *)ucpData, (char *)dbmval.dptr+sizeof(time_t), nData);
memcpy(&expiry, dbmval.dptr, sizeof(time_t));
apr_dbm_close(dbm);
SHMCBHeader *header;
SSL_SESSION *pSession = NULL;
unsigned int curr_pos, loop, count;
- unsigned char *ptr;
+ MODSSL_D2I_DATUM_TYPE ptr;
time_t now;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
SHMCBIndex *idx;
SHMCBHeader *header;
unsigned int curr_pos, loop, count;
- unsigned char *ptr;
+ MODSSL_D2I_DATUM_TYPE ptr;
BOOL to_return = FALSE;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
#define MODSSL_BIO_CB_ARG_TYPE const char
#define MODSSL_CRYPTO_CB_ARG_TYPE const char
#if (OPENSSL_VERSION_NUMBER < 0x00907000)
-#define MODSSL_INFO_CB_ARG_TYPE SSL*
+# define MODSSL_INFO_CB_ARG_TYPE SSL*
#else
-#define MODSSL_INFO_CB_ARG_TYPE const SSL*
+# define MODSSL_INFO_CB_ARG_TYPE const SSL*
#endif
#define MODSSL_CLIENT_CERT_CB_ARG_TYPE X509
#define MODSSL_PCHAR_CAST
+#if (OPENSSL_VERSION_NUMBER < 0x0090707f)
+# define MODSSL_D2I_DATUM_TYPE unsigned char *
+#else
+# define MODSSL_D2I_DATUM_TYPE const unsigned char *
+#endif
+
#define modssl_X509_verify_cert X509_verify_cert
#define MODSSL_INFO_CB_ARG_TYPE SSL*
#define MODSSL_CLIENT_CERT_CB_ARG_TYPE void
#define MODSSL_PCHAR_CAST (char *)
+#define MODSSL_D2I_DATUM_TYPE unsigned char *
typedef int (modssl_read_bio_cb_fn)(char*,int,int);