Loading crypto/engine/eng_padlock.c +8 −4 Original line number Diff line number Diff line Loading @@ -445,10 +445,14 @@ static inline void *name(size_t cnt, \ } /* Generate all functions with appropriate opcodes */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8") /* rep xcryptecb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc, ".byte 0xf3,0x0f,0xa7,0xd0") /* rep xcryptcbc */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0") /* rep xcryptcfb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8") /* rep xcryptofb */ /* rep xcryptecb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8") /* rep xcryptcbc */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc, ".byte 0xf3,0x0f,0xa7,0xd0") /* rep xcryptcfb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0") /* rep xcryptofb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8") #endif /* The RNG call itself */ Loading demos/tunala/tunala.h +2 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,8 @@ void buffer_to_BIO(buffer_t *buf, BIO *bio); /* Callbacks */ void cb_ssl_info(const SSL *s, int where, int ret); void cb_ssl_info_set_output(FILE *fp); /* Called if output should be sent too */ /* Called if output should be sent too */ void cb_ssl_info_set_output(FILE *fp); int cb_ssl_verify(int ok, X509_STORE_CTX *ctx); void cb_ssl_verify_set_output(FILE *fp); void cb_ssl_verify_set_depth(unsigned int verify_depth); Loading ssl/s2_clnt.c +23 −5 Original line number Diff line number Diff line Loading @@ -386,7 +386,10 @@ static int get_server_hello(SSL *s) i = ssl2_read(s,(char *)&(buf[s->init_num]),j); if (i != j) return(ssl2_part_read(s,SSL_F_GET_SERVER_HELLO,i)); if (s->msg_callback) s->msg_callback(0, s->version, 0, buf, (size_t)len, s, s->msg_callback_arg); /* SERVER-HELLO */ { /* SERVER-HELLO */ s->msg_callback(0, s->version, 0, buf, (size_t)len, s, s->msg_callback_arg); } /* things are looking good */ Loading Loading @@ -765,7 +768,10 @@ static int client_certificate(SSL *s) return(ssl2_part_read(s,SSL_F_CLIENT_CERTIFICATE,i)); s->init_num += i; if (s->msg_callback) s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); /* REQUEST-CERTIFICATE */ { /* REQUEST-CERTIFICATE */ s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); } /* type=buf[0]; */ /* type eq x509 */ Loading Loading @@ -932,7 +938,10 @@ static int get_server_verify(SSL *s) if (i < n) return(ssl2_part_read(s,SSL_F_GET_SERVER_VERIFY,i)); if (s->msg_callback) s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* SERVER-VERIFY */ { /* SERVER-VERIFY */ s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); } p += 1; if (CRYPTO_memcmp(p,s->s2->challenge,s->s2->challenge_length) != 0) Loading Loading @@ -986,11 +995,20 @@ static int get_server_finished(SSL *s) len = 1 + SSL2_SSL_SESSION_ID_LENGTH; n = len - s->init_num; i = ssl2_read(s,(char *)&(buf[s->init_num]), n); if (i < n) /* XXX could be shorter than SSL2_SSL_SESSION_ID_LENGTH, that's the maximum */ if (i < n) { /* * XXX could be shorter than SSL2_SSL_SESSION_ID_LENGTH, * that's the maximum */ return(ssl2_part_read(s,SSL_F_GET_SERVER_FINISHED,i)); } s->init_num += i; if (s->msg_callback) s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); /* SERVER-FINISHED */ { /* SERVER-FINISHED */ s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); } if (!s->hit) /* new session */ { Loading ssl/s2_lib.c +4 −1 Original line number Diff line number Diff line Loading @@ -462,7 +462,10 @@ void ssl2_write_error(SSL *s) if (s->error == 0) if (s->msg_callback) s->msg_callback(1, s->version, 0, buf, 3, s, s->msg_callback_arg); /* ERROR */ { /* ERROR */ s->msg_callback(1, s->version, 0, buf, 3, s, s->msg_callback_arg); } } } Loading ssl/s2_srvr.c +20 −5 Original line number Diff line number Diff line Loading @@ -434,7 +434,10 @@ static int get_client_master_key(SSL *s) i = ssl2_read(s,(char *)&(p[s->init_num]),n); if (i != n) return(ssl2_part_read(s,SSL_F_GET_CLIENT_MASTER_KEY,i)); if (s->msg_callback) s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); /* CLIENT-MASTER-KEY */ { /* CLIENT-MASTER-KEY */ s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); } p += 10; memcpy(s->session->key_arg,&(p[s->s2->tmp.clear+s->s2->tmp.enc]), Loading Loading @@ -583,7 +586,10 @@ static int get_client_hello(SSL *s) i = ssl2_read(s,(char *)&(p[s->init_num]),n); if (i != n) return(ssl2_part_read(s,SSL_F_GET_CLIENT_HELLO,i)); if (s->msg_callback) s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); /* CLIENT-HELLO */ { /* CLIENT-HELLO */ s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); } p += 9; /* get session-id before cipher stuff so we can get out session Loading Loading @@ -856,7 +862,10 @@ static int get_client_finished(SSL *s) return(ssl2_part_read(s,SSL_F_GET_CLIENT_FINISHED,i)); } if (s->msg_callback) s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* CLIENT-FINISHED */ { /* CLIENT-FINISHED */ s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); } p += 1; if (memcmp(p,s->s2->conn_id,s->s2->conn_id_length) != 0) { Loading Loading @@ -979,7 +988,10 @@ static int request_certificate(SSL *s) } if (s->msg_callback) s->msg_callback(0, s->version, 0, p, 3, s, s->msg_callback_arg); /* ERROR */ { /* ERROR */ s->msg_callback(0, s->version, 0, p, 3, s, s->msg_callback_arg); } /* this is the one place where we can recover from an SSL 2.0 error */ Loading Loading @@ -1034,7 +1046,10 @@ static int request_certificate(SSL *s) goto end; } if (s->msg_callback) s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* CLIENT-CERTIFICATE */ { /* CLIENT-CERTIFICATE */ s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); } p += 6; cp = p; Loading Loading
crypto/engine/eng_padlock.c +8 −4 Original line number Diff line number Diff line Loading @@ -445,10 +445,14 @@ static inline void *name(size_t cnt, \ } /* Generate all functions with appropriate opcodes */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8") /* rep xcryptecb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc, ".byte 0xf3,0x0f,0xa7,0xd0") /* rep xcryptcbc */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0") /* rep xcryptcfb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8") /* rep xcryptofb */ /* rep xcryptecb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8") /* rep xcryptcbc */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc, ".byte 0xf3,0x0f,0xa7,0xd0") /* rep xcryptcfb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0") /* rep xcryptofb */ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8") #endif /* The RNG call itself */ Loading
demos/tunala/tunala.h +2 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,8 @@ void buffer_to_BIO(buffer_t *buf, BIO *bio); /* Callbacks */ void cb_ssl_info(const SSL *s, int where, int ret); void cb_ssl_info_set_output(FILE *fp); /* Called if output should be sent too */ /* Called if output should be sent too */ void cb_ssl_info_set_output(FILE *fp); int cb_ssl_verify(int ok, X509_STORE_CTX *ctx); void cb_ssl_verify_set_output(FILE *fp); void cb_ssl_verify_set_depth(unsigned int verify_depth); Loading
ssl/s2_clnt.c +23 −5 Original line number Diff line number Diff line Loading @@ -386,7 +386,10 @@ static int get_server_hello(SSL *s) i = ssl2_read(s,(char *)&(buf[s->init_num]),j); if (i != j) return(ssl2_part_read(s,SSL_F_GET_SERVER_HELLO,i)); if (s->msg_callback) s->msg_callback(0, s->version, 0, buf, (size_t)len, s, s->msg_callback_arg); /* SERVER-HELLO */ { /* SERVER-HELLO */ s->msg_callback(0, s->version, 0, buf, (size_t)len, s, s->msg_callback_arg); } /* things are looking good */ Loading Loading @@ -765,7 +768,10 @@ static int client_certificate(SSL *s) return(ssl2_part_read(s,SSL_F_CLIENT_CERTIFICATE,i)); s->init_num += i; if (s->msg_callback) s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); /* REQUEST-CERTIFICATE */ { /* REQUEST-CERTIFICATE */ s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); } /* type=buf[0]; */ /* type eq x509 */ Loading Loading @@ -932,7 +938,10 @@ static int get_server_verify(SSL *s) if (i < n) return(ssl2_part_read(s,SSL_F_GET_SERVER_VERIFY,i)); if (s->msg_callback) s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* SERVER-VERIFY */ { /* SERVER-VERIFY */ s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); } p += 1; if (CRYPTO_memcmp(p,s->s2->challenge,s->s2->challenge_length) != 0) Loading Loading @@ -986,11 +995,20 @@ static int get_server_finished(SSL *s) len = 1 + SSL2_SSL_SESSION_ID_LENGTH; n = len - s->init_num; i = ssl2_read(s,(char *)&(buf[s->init_num]), n); if (i < n) /* XXX could be shorter than SSL2_SSL_SESSION_ID_LENGTH, that's the maximum */ if (i < n) { /* * XXX could be shorter than SSL2_SSL_SESSION_ID_LENGTH, * that's the maximum */ return(ssl2_part_read(s,SSL_F_GET_SERVER_FINISHED,i)); } s->init_num += i; if (s->msg_callback) s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); /* SERVER-FINISHED */ { /* SERVER-FINISHED */ s->msg_callback(0, s->version, 0, buf, (size_t)s->init_num, s, s->msg_callback_arg); } if (!s->hit) /* new session */ { Loading
ssl/s2_lib.c +4 −1 Original line number Diff line number Diff line Loading @@ -462,7 +462,10 @@ void ssl2_write_error(SSL *s) if (s->error == 0) if (s->msg_callback) s->msg_callback(1, s->version, 0, buf, 3, s, s->msg_callback_arg); /* ERROR */ { /* ERROR */ s->msg_callback(1, s->version, 0, buf, 3, s, s->msg_callback_arg); } } } Loading
ssl/s2_srvr.c +20 −5 Original line number Diff line number Diff line Loading @@ -434,7 +434,10 @@ static int get_client_master_key(SSL *s) i = ssl2_read(s,(char *)&(p[s->init_num]),n); if (i != n) return(ssl2_part_read(s,SSL_F_GET_CLIENT_MASTER_KEY,i)); if (s->msg_callback) s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); /* CLIENT-MASTER-KEY */ { /* CLIENT-MASTER-KEY */ s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); } p += 10; memcpy(s->session->key_arg,&(p[s->s2->tmp.clear+s->s2->tmp.enc]), Loading Loading @@ -583,7 +586,10 @@ static int get_client_hello(SSL *s) i = ssl2_read(s,(char *)&(p[s->init_num]),n); if (i != n) return(ssl2_part_read(s,SSL_F_GET_CLIENT_HELLO,i)); if (s->msg_callback) s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); /* CLIENT-HELLO */ { /* CLIENT-HELLO */ s->msg_callback(0, s->version, 0, p, (size_t)len, s, s->msg_callback_arg); } p += 9; /* get session-id before cipher stuff so we can get out session Loading Loading @@ -856,7 +862,10 @@ static int get_client_finished(SSL *s) return(ssl2_part_read(s,SSL_F_GET_CLIENT_FINISHED,i)); } if (s->msg_callback) s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* CLIENT-FINISHED */ { /* CLIENT-FINISHED */ s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); } p += 1; if (memcmp(p,s->s2->conn_id,s->s2->conn_id_length) != 0) { Loading Loading @@ -979,7 +988,10 @@ static int request_certificate(SSL *s) } if (s->msg_callback) s->msg_callback(0, s->version, 0, p, 3, s, s->msg_callback_arg); /* ERROR */ { /* ERROR */ s->msg_callback(0, s->version, 0, p, 3, s, s->msg_callback_arg); } /* this is the one place where we can recover from an SSL 2.0 error */ Loading Loading @@ -1034,7 +1046,10 @@ static int request_certificate(SSL *s) goto end; } if (s->msg_callback) s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); /* CLIENT-CERTIFICATE */ { /* CLIENT-CERTIFICATE */ s->msg_callback(0, s->version, 0, p, len, s, s->msg_callback_arg); } p += 6; cp = p; Loading