Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ssl_util_ssl.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
34 #ifndef __SSL_UTIL_SSL_H__
35 #define __SSL_UTIL_SSL_H__
36 
41 #define MODSSL_LIBRARY_VERSION OPENSSL_VERSION_NUMBER
42 #define MODSSL_LIBRARY_NAME "OpenSSL"
43 #define MODSSL_LIBRARY_TEXT OPENSSL_VERSION_TEXT
44 #if MODSSL_USE_OPENSSL_PRE_1_1_API
45 #define MODSSL_LIBRARY_DYNTEXT SSLeay_version(SSLEAY_VERSION)
46 #else
47 #define MODSSL_LIBRARY_DYNTEXT OpenSSL_version(OPENSSL_VERSION)
48 #endif
49 
55 #define MODSSL_SESSION_MAX_DER 1024*10
56 
58 #define MODSSL_SESSION_ID_STRING_LEN \
59  ((SSL_MAX_SSL_SESSION_ID_LENGTH + 1) * 2)
60 
64 void modssl_init_app_data2_idx(void);
65 void *modssl_get_app_data2(SSL *);
66 void modssl_set_app_data2(SSL *, void *);
67 
68 /* Read private key from filename in either PEM or raw base64(DER)
69  * format, using password entry callback cb and userdata. */
70 EVP_PKEY *modssl_read_privatekey(const char *filename, pem_password_cb *cb, void *ud);
71 
72 int modssl_smart_shutdown(SSL *ssl);
73 BOOL modssl_X509_getBC(X509 *, int *, int *);
74 char *modssl_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne,
75  int raw);
76 char *modssl_X509_NAME_to_string(apr_pool_t *, X509_NAME *, int);
77 BOOL modssl_X509_getSAN(apr_pool_t *, X509 *, int, const char *, int, apr_array_header_t **);
78 BOOL modssl_X509_match_name(apr_pool_t *, X509 *, const char *, BOOL, server_rec *);
79 char *modssl_SSL_SESSION_id2sz(IDCONST unsigned char *, int, char *, int);
80 
81 #endif /* __SSL_UTIL_SSL_H__ */
82 
void modssl_set_app_data2(SSL *, void *)
#define BOOL
Definition: macros.h:25
#define IDCONST
Definition: ssl_private.h:159
Definition: apr_tables.h:62
BOOL modssl_X509_getBC(X509 *, int *, int *)
char * modssl_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne, int raw)
EVP_PKEY * modssl_read_privatekey(const char *filename, pem_password_cb *cb, void *ud)
char * modssl_SSL_SESSION_id2sz(IDCONST unsigned char *, int, char *, int)
void modssl_init_app_data2_idx(void)
BOOL modssl_X509_getSAN(apr_pool_t *, X509 *, int, const char *, int, apr_array_header_t **)
A structure to store information for each virtual server.
Definition: httpd.h:1313
void * modssl_get_app_data2(SSL *)
apr_pool_t * p
char * modssl_X509_NAME_to_string(apr_pool_t *, X509_NAME *, int)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int modssl_smart_shutdown(SSL *ssl)
BOOL modssl_X509_match_name(apr_pool_t *, X509 *, const char *, BOOL, server_rec *)