X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fssl.h;h=f41a17e8df7341f43daf27f50d11e96ab971edad;hp=be2e3c72f419fe24a292735bbb77262f3e6f08bb;hb=3aceb94b9e6ac4722b96d4fb1cf7e1a4358941e0;hpb=fbb41ae0ad1369d6fe8d6c72d2297270ad24f0e5 diff --git a/ssl/ssl.h b/ssl/ssl.h index be2e3c72f4..f41a17e8df 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -59,12 +59,21 @@ #ifndef HEADER_SSL_H #define HEADER_SSL_H +#ifndef NO_COMP +#include +#endif +#ifndef NO_BIO +#include +#endif +#ifndef NO_X509 +#include +#endif +#include + #ifdef __cplusplus extern "C" { #endif -#include - /* SSLeay version number for ASN.1 encoding of the session information */ /* Version 0 - initial version * Version 1 - added the optional peer certificate @@ -140,6 +149,10 @@ extern "C" { #define SSL_SENT_SHUTDOWN 1 #define SSL_RECEIVED_SHUTDOWN 2 +#ifdef __cplusplus +} +#endif + #include #include #include @@ -147,6 +160,10 @@ extern "C" { #include #include +#ifdef __cplusplus +extern "C" { +#endif + #if (defined(NO_RSA) || defined(NO_MD5)) && !defined(NO_SSL2) #define NO_SSL2 #endif @@ -346,7 +363,7 @@ typedef struct ssl_comp_st { int id; char *name; -#ifdef HEADER_COMP_H +#ifndef NO_COMP COMP_METHOD *method; #else char *method; @@ -391,9 +408,8 @@ struct ssl_ctx_st * SSL_SESSION_free() when it has finished using it. Otherwise, * on 0, it means the callback has finished with it. * If remove_session_cb is not null, it will be called when - * a session-id is removed from the cache. Again, a return - * of 0 mens that SSLeay should not SSL_SESSION_free() since - * the application is doing something with it. */ + * a session-id is removed from the cache. After the call, + * OpenSSL will SSL_SESSION_free() it. */ int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess); void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess); SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, @@ -472,6 +488,7 @@ struct ssl_ctx_st * defined, this will still get called. */ #define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 0x0100 + struct lhash_st *SSL_CTX_sessions(SSL_CTX *ctx); #define SSL_CTX_sess_number(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL) #define SSL_CTX_sess_connect(ctx) \ @@ -533,7 +550,7 @@ struct ssl_st * same. This is so data can be read and written to different * handlers */ -#ifdef HEADER_BIO_H +#ifndef NO_BIO BIO *rbio; /* used by SSL_read */ BIO *wbio; /* used by SSL_write */ BIO *bbio; /* used during session-id reuse to concatinate @@ -597,7 +614,7 @@ struct ssl_st EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */ const EVP_MD *read_hash; /* used for mac generation */ -#ifdef HEADER_COMP_H +#ifndef NO_COMP COMP_CTX *expand; /* uncompress */ #else char *expand; @@ -605,7 +622,7 @@ struct ssl_st EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ const EVP_MD *write_hash; /* used for mac generation */ -#ifdef HEADER_COMP_H +#ifndef NO_COMP COMP_CTX *compress; /* compression */ #else char *compress; @@ -655,11 +672,19 @@ struct ssl_st * SSLv3/TLS rollback check */ }; +#ifdef __cplusplus +} +#endif + #include #include #include /* This is mostly sslv3 with a few tweaks */ #include +#ifdef __cplusplus +extern "C" { +#endif + /* compatibility */ #define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg)) #define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) @@ -883,7 +908,7 @@ size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count); #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_sub_to_stack #endif -#ifdef HEADER_BIO_H +#ifndef NO_BIO BIO_METHOD *BIO_f_ssl(void); BIO *BIO_new_ssl(SSL_CTX *ctx,int client); BIO *BIO_new_ssl_connect(SSL_CTX *ctx); @@ -920,7 +945,7 @@ int SSL_set_fd(SSL *s, int fd); int SSL_set_rfd(SSL *s, int fd); int SSL_set_wfd(SSL *s, int fd); #endif -#ifdef HEADER_BIO_H +#ifndef NO_BIO void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); BIO * SSL_get_rbio(SSL *s); BIO * SSL_get_wbio(SSL *s); @@ -975,7 +1000,7 @@ int SSL_SESSION_cmp(SSL_SESSION *a,SSL_SESSION *b); #ifndef NO_FP_API int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses); #endif -#ifdef HEADER_BIO_H +#ifndef NO_BIO int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses); #endif void SSL_SESSION_free(SSL_SESSION *ses); @@ -1171,7 +1196,7 @@ void SSL_set_tmp_dh_callback(SSL *ssl, int keylength)); #endif -#ifdef HEADER_COMP_H +#ifndef NO_COMP int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); #else int SSL_COMP_add_compression_method(int id,char *cm); @@ -1214,6 +1239,7 @@ int SSL_COMP_add_compression_method(int id,char *cm); #define SSL_F_SSL2_SET_CERTIFICATE 126 #define SSL_F_SSL2_WRITE 127 #define SSL_F_SSL3_ACCEPT 128 +#define SSL_F_SSL3_CALLBACK_CTRL 233 #define SSL_F_SSL3_CHANGE_CIPHER_STATE 129 #define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130 #define SSL_F_SSL3_CLIENT_HELLO 131