X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fssl_lib.c;h=3c71d5b367967c18e332a72bdac1a8a894c6d071;hp=4d74f6e45cd5a7dc0b78fc8a8136cb6e50b7786d;hb=657e60fa00ddde3618600d6306be913214d30457;hpb=018e57c74d9dc6b5676aead4be11cd28a8617ea4 diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 4d74f6e45c..3c71d5b367 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -64,15 +64,15 @@ #include #include "ssl_locl.h" -char *SSL_version_str=OPENSSL_VERSION_TEXT; +const char *SSL_version_str=OPENSSL_VERSION_TEXT; -static STACK *ssl_meth=NULL; -static STACK *ssl_ctx_meth=NULL; +static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_meth=NULL; +static STACK_OF(CRYPTO_EX_DATA_FUNCS) *ssl_ctx_meth=NULL; static int ssl_meth_num=0; static int ssl_ctx_meth_num=0; OPENSSL_GLOBAL SSL3_ENC_METHOD ssl3_undef_enc_method={ - /* evil casts, but these functions are only called if there's a libraryr bug */ + /* evil casts, but these functions are only called if there's a library bug */ (int (*)(SSL *,int))ssl_undefined_function, (int (*)(SSL *, unsigned char *, int))ssl_undefined_function, ssl_undefined_function, @@ -234,7 +234,7 @@ SSL *SSL_new(SSL_CTX *ctx) s->mode=ctx->mode; SSL_clear(s); - CRYPTO_new_ex_data(ssl_meth,(char *)s,&s->ex_data); + CRYPTO_new_ex_data(ssl_meth,s,&s->ex_data); return(s); err: @@ -380,7 +380,7 @@ void SSL_free(SSL *s) if (s->method != NULL) s->method->ssl_free(s); - Free((char *)s); + Free(s); } void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio) @@ -1215,7 +1215,7 @@ void SSL_CTX_free(SSL_CTX *a) sk_X509_pop_free(a->extra_certs,X509_free); if (a->comp_methods != NULL) sk_SSL_COMP_pop_free(a->comp_methods,SSL_COMP_free); - Free((char *)a); + Free(a); } void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) @@ -1615,7 +1615,7 @@ SSL_METHOD *ssl_bad_method(int ver) return(NULL); } -char *SSL_get_version(SSL *s) +const char *SSL_get_version(SSL *s) { if (s->version == TLS1_VERSION) return("TLSv1"); @@ -1919,8 +1919,8 @@ long SSL_get_verify_result(SSL *ssl) return(ssl->verify_result); } -int SSL_get_ex_new_index(long argl,char *argp,int (*new_func)(), - int (*dup_func)(),void (*free_func)()) +int SSL_get_ex_new_index(long argl,void *argp,CRYPTO_EX_new *new_func, + CRYPTO_EX_dup *dup_func,CRYPTO_EX_free *free_func) { ssl_meth_num++; return(CRYPTO_get_ex_new_index(ssl_meth_num-1, @@ -1937,8 +1937,8 @@ void *SSL_get_ex_data(SSL *s,int idx) return(CRYPTO_get_ex_data(&s->ex_data,idx)); } -int SSL_CTX_get_ex_new_index(long argl,char *argp,int (*new_func)(), - int (*dup_func)(),void (*free_func)()) +int SSL_CTX_get_ex_new_index(long argl,void *argp,CRYPTO_EX_new *new_func, + CRYPTO_EX_dup *dup_func,CRYPTO_EX_free *free_func) { ssl_ctx_meth_num++; return(CRYPTO_get_ex_new_index(ssl_ctx_meth_num-1,