Loading ssl/s2_lib.c +5 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,11 @@ void ssl2_generate_key_material(SSL *s) unsigned char *km; unsigned char c='0'; #ifdef CHARSET_EBCDIC c = os_toascii['0']; /* Must be an ASCII '0', not EBCDIC '0', see SSLv2 docu */ #endif km=s->s2->key_material; for (i=0; i<s->s2->key_material_length; i+=MD5_DIGEST_LENGTH) { Loading ssl/s3_enc.c +9 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,9 @@ static void ssl3_generate_key_block(SSL *s, unsigned char *km, int num) unsigned char c='A'; int i,j,k; #ifdef CHARSET_EBCDIC c = os_toascii[c]; /*'A' in ASCII */ #endif k=0; for (i=0; i<num; i+=MD5_DIGEST_LENGTH) { Loading Loading @@ -514,9 +517,15 @@ int ssl3_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, int len) { static const unsigned char *salt[3]={ #ifndef CHARSET_EBCDIC (const unsigned char *)"A", (const unsigned char *)"BB", (const unsigned char *)"CCC", #else (const unsigned char *)"\x41", (const unsigned char *)"\x42\x42", (const unsigned char *)"\x43\x43\x43", #endif }; unsigned char buf[EVP_MAX_MD_SIZE]; EVP_MD_CTX ctx; Loading ssl/ssl_ciph.c +4 −0 Original line number Diff line number Diff line Loading @@ -458,10 +458,14 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(SSL_METHOD *ssl_method, { ch= *l; i=0; #ifndef CHARSET_EBCDIC while ( ((ch >= 'A') && (ch <= 'Z')) || ((ch >= '0') && (ch <= '9')) || ((ch >= 'a') && (ch <= 'z')) || (ch == '-')) #else while ( isalnum(ch) || (ch == '-')) #endif { buf[i]=ch; ch= *(++l); Loading ssl/tls1.h +19 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,25 @@ extern "C" { #define TLS_MD_MASTER_SECRET_CONST "master secret" #define TLS_MD_MASTER_SECRET_CONST_SIZE 13 #ifdef CHARSET_EBCDIC #undef TLS_MD_CLIENT_FINISH_CONST #define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64" /*client finished*/ #undef TLS_MD_SERVER_FINISH_CONST #define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64" /*server finished*/ #undef TLS_MD_SERVER_WRITE_KEY_CONST #define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*server write key*/ #undef TLS_MD_KEY_EXPANSION_CONST #define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e" /*key expansion*/ #undef TLS_MD_CLIENT_WRITE_KEY_CONST #define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*client write key*/ #undef TLS_MD_SERVER_WRITE_KEY_CONST #define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*server write key*/ #undef TLS_MD_IV_BLOCK_CONST #define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b" /*IV block*/ #undef TLS_MD_MASTER_SECRET_CONST #define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" /*master secret*/ #endif #ifdef __cplusplus } #endif Loading Loading
ssl/s2_lib.c +5 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,11 @@ void ssl2_generate_key_material(SSL *s) unsigned char *km; unsigned char c='0'; #ifdef CHARSET_EBCDIC c = os_toascii['0']; /* Must be an ASCII '0', not EBCDIC '0', see SSLv2 docu */ #endif km=s->s2->key_material; for (i=0; i<s->s2->key_material_length; i+=MD5_DIGEST_LENGTH) { Loading
ssl/s3_enc.c +9 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,9 @@ static void ssl3_generate_key_block(SSL *s, unsigned char *km, int num) unsigned char c='A'; int i,j,k; #ifdef CHARSET_EBCDIC c = os_toascii[c]; /*'A' in ASCII */ #endif k=0; for (i=0; i<num; i+=MD5_DIGEST_LENGTH) { Loading Loading @@ -514,9 +517,15 @@ int ssl3_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, int len) { static const unsigned char *salt[3]={ #ifndef CHARSET_EBCDIC (const unsigned char *)"A", (const unsigned char *)"BB", (const unsigned char *)"CCC", #else (const unsigned char *)"\x41", (const unsigned char *)"\x42\x42", (const unsigned char *)"\x43\x43\x43", #endif }; unsigned char buf[EVP_MAX_MD_SIZE]; EVP_MD_CTX ctx; Loading
ssl/ssl_ciph.c +4 −0 Original line number Diff line number Diff line Loading @@ -458,10 +458,14 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(SSL_METHOD *ssl_method, { ch= *l; i=0; #ifndef CHARSET_EBCDIC while ( ((ch >= 'A') && (ch <= 'Z')) || ((ch >= '0') && (ch <= '9')) || ((ch >= 'a') && (ch <= 'z')) || (ch == '-')) #else while ( isalnum(ch) || (ch == '-')) #endif { buf[i]=ch; ch= *(++l); Loading
ssl/tls1.h +19 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,25 @@ extern "C" { #define TLS_MD_MASTER_SECRET_CONST "master secret" #define TLS_MD_MASTER_SECRET_CONST_SIZE 13 #ifdef CHARSET_EBCDIC #undef TLS_MD_CLIENT_FINISH_CONST #define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64" /*client finished*/ #undef TLS_MD_SERVER_FINISH_CONST #define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64" /*server finished*/ #undef TLS_MD_SERVER_WRITE_KEY_CONST #define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*server write key*/ #undef TLS_MD_KEY_EXPANSION_CONST #define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e" /*key expansion*/ #undef TLS_MD_CLIENT_WRITE_KEY_CONST #define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*client write key*/ #undef TLS_MD_SERVER_WRITE_KEY_CONST #define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" /*server write key*/ #undef TLS_MD_IV_BLOCK_CONST #define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b" /*IV block*/ #undef TLS_MD_MASTER_SECRET_CONST #define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" /*master secret*/ #endif #ifdef __cplusplus } #endif Loading