Loading apps/s_apps.h +6 −3 Original line number Diff line number Diff line Loading @@ -148,7 +148,9 @@ typedef fd_mask fd_set; #define PORT_STR "4433" #define PROTOCOL "tcp" int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context); int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context); #ifdef HEADER_X509_H int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); #endif Loading @@ -162,11 +164,12 @@ int extract_port(char *str, short *port_ptr); int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p); long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret); size_t argi, long argl, long ret); #ifdef HEADER_SSL_H void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret); void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type, unsigned char *data, int len, void *arg); Loading apps/s_cb.c +1 −1 Original line number Diff line number Diff line Loading @@ -260,7 +260,7 @@ int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key) } long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret) size_t argi, long argl, long ret) { BIO *out; Loading apps/s_socket.c +3 −1 Original line number Diff line number Diff line Loading @@ -279,7 +279,9 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port, int type) return(1); } int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context) int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context) { int sock; char *name = NULL; Loading crypto/asn1/a_bitstr.c +14 −14 Original line number Diff line number Diff line Loading @@ -60,12 +60,13 @@ #include "cryptlib.h" #include <openssl/asn1.h> int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, unsigned char *d, int len) int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, unsigned char *d, size_t len) { return M_ASN1_BIT_STRING_set(x, d, len); } int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) { int ret,j,bits,len; int ret,j,bits; size_t len; unsigned char *p,*d; if (a == NULL) return(0); Loading Loading @@ -114,7 +115,7 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) } ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) const unsigned char **pp, size_t len) { ASN1_BIT_STRING *ret=NULL; const unsigned char *p; Loading Loading @@ -144,13 +145,13 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, if (len-- > 1) /* using one because of the bits left byte */ { s=(unsigned char *)OPENSSL_malloc((int)len); s=OPENSSL_malloc(len); if (s == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } memcpy(s,p,(int)len); memcpy(s,p,len); s[len-1]&=(0xff<<i); p+=len; } Loading @@ -173,9 +174,10 @@ err: /* These next 2 functions from Goetz Babin-Ebell <babinebell@trustcenter.de> */ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, size_t n, int value) { int w,v,iv; int v,iv; size_t w; unsigned char *c; w=n/8; Loading @@ -192,11 +194,9 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) { if (!value) return(1); /* Don't need to set */ if (a->data == NULL) c=(unsigned char *)OPENSSL_malloc(w+1); c=OPENSSL_malloc(w+1); else c=(unsigned char *)OPENSSL_realloc_clean(a->data, a->length, w+1); c=OPENSSL_realloc_clean(a->data, a->length, w+1); if (c == NULL) { ASN1err(ASN1_F_ASN1_BIT_STRING_SET_BIT,ERR_R_MALLOC_FAILURE); Loading @@ -212,7 +212,7 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) return(1); } int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n) int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, size_t n) { int w,v; Loading @@ -230,7 +230,7 @@ int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n) * 'len' is the length of 'flags'. */ int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a, unsigned char *flags, int flags_len) unsigned char *flags, size_t flags_len) { int i, ok; /* Check if there is one bit set at all. */ Loading crypto/asn1/a_bool.c +2 −2 Original line number Diff line number Diff line Loading @@ -75,11 +75,11 @@ int i2d_ASN1_BOOLEAN(int a, unsigned char **pp) return(r); } int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length) int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, size_t length) { int ret= -1; const unsigned char *p; long len; size_t len; int inf,tag,xclass; int i=0; Loading Loading
apps/s_apps.h +6 −3 Original line number Diff line number Diff line Loading @@ -148,7 +148,9 @@ typedef fd_mask fd_set; #define PORT_STR "4433" #define PROTOCOL "tcp" int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context); int do_server(int port, int type, int *ret, int (*cb) (char *hostname, int s, unsigned char *context), unsigned char *context); #ifdef HEADER_X509_H int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx); #endif Loading @@ -162,11 +164,12 @@ int extract_port(char *str, short *port_ptr); int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p); long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret); size_t argi, long argl, long ret); #ifdef HEADER_SSL_H void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret); void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type, unsigned char *data, int len, void *arg); Loading
apps/s_cb.c +1 −1 Original line number Diff line number Diff line Loading @@ -260,7 +260,7 @@ int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key) } long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret) size_t argi, long argl, long ret) { BIO *out; Loading
apps/s_socket.c +3 −1 Original line number Diff line number Diff line Loading @@ -279,7 +279,9 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port, int type) return(1); } int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context) int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context) { int sock; char *name = NULL; Loading
crypto/asn1/a_bitstr.c +14 −14 Original line number Diff line number Diff line Loading @@ -60,12 +60,13 @@ #include "cryptlib.h" #include <openssl/asn1.h> int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, unsigned char *d, int len) int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, unsigned char *d, size_t len) { return M_ASN1_BIT_STRING_set(x, d, len); } int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) { int ret,j,bits,len; int ret,j,bits; size_t len; unsigned char *p,*d; if (a == NULL) return(0); Loading Loading @@ -114,7 +115,7 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) } ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) const unsigned char **pp, size_t len) { ASN1_BIT_STRING *ret=NULL; const unsigned char *p; Loading Loading @@ -144,13 +145,13 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, if (len-- > 1) /* using one because of the bits left byte */ { s=(unsigned char *)OPENSSL_malloc((int)len); s=OPENSSL_malloc(len); if (s == NULL) { i=ERR_R_MALLOC_FAILURE; goto err; } memcpy(s,p,(int)len); memcpy(s,p,len); s[len-1]&=(0xff<<i); p+=len; } Loading @@ -173,9 +174,10 @@ err: /* These next 2 functions from Goetz Babin-Ebell <babinebell@trustcenter.de> */ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, size_t n, int value) { int w,v,iv; int v,iv; size_t w; unsigned char *c; w=n/8; Loading @@ -192,11 +194,9 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) { if (!value) return(1); /* Don't need to set */ if (a->data == NULL) c=(unsigned char *)OPENSSL_malloc(w+1); c=OPENSSL_malloc(w+1); else c=(unsigned char *)OPENSSL_realloc_clean(a->data, a->length, w+1); c=OPENSSL_realloc_clean(a->data, a->length, w+1); if (c == NULL) { ASN1err(ASN1_F_ASN1_BIT_STRING_SET_BIT,ERR_R_MALLOC_FAILURE); Loading @@ -212,7 +212,7 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) return(1); } int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n) int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, size_t n) { int w,v; Loading @@ -230,7 +230,7 @@ int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n) * 'len' is the length of 'flags'. */ int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a, unsigned char *flags, int flags_len) unsigned char *flags, size_t flags_len) { int i, ok; /* Check if there is one bit set at all. */ Loading
crypto/asn1/a_bool.c +2 −2 Original line number Diff line number Diff line Loading @@ -75,11 +75,11 @@ int i2d_ASN1_BOOLEAN(int a, unsigned char **pp) return(r); } int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length) int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, size_t length) { int ret= -1; const unsigned char *p; long len; size_t len; int inf,tag,xclass; int i=0; Loading