X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fs3_both.c;h=a6348b6260361c68d8bc0c56138c452a0fa1c3b3;hp=4301621d1cad7c1099bb7f36887e3b0f104b53c0;hb=c44f75404776af0d046ae05258b055389fb5686a;hpb=891e465607f2c98d041bba6b0c269a630c5cf414 diff --git a/ssl/s3_both.c b/ssl/s3_both.c index 4301621d1c..a6348b6260 100644 --- a/ssl/s3_both.c +++ b/ssl/s3_both.c @@ -64,8 +64,7 @@ #include #include "ssl_locl.h" -int ssl3_send_finished(SSL *s, int a, int b, unsigned char *sender, - int slen) +int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) { unsigned char *p,*d; int i; @@ -293,6 +292,18 @@ long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) SSLerr(SSL_F_SSL3_GET_MESSAGE,SSL_R_UNEXPECTED_MESSAGE); goto f_err; } + if((mt < 0) && (*p == SSL3_MT_CLIENT_HELLO) && + (st1 == SSL3_ST_SR_CERT_A) && + (stn == SSL3_ST_SR_CERT_B)) + { + /* At this point we have got an MS SGC second client + * hello. We need to restart the mac and mac the data + * currently received. + */ + ssl3_init_finished_mac(s); + ssl3_finish_mac(s, p + s->init_num, i); + } + s->s3->tmp.message_type= *(p++); n2l3(p,l);