summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2012-05-30 12:01:28 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2012-05-30 12:01:28 +0000
commit071183ef48062f3d4cd317aac2b7639dc2d70dc9 (patch)
tree65737bc2effe2c9fe69b85d98c9b789db453e3d5 /crypto
parenta856ddc6658d0602ba942b1c357be145a033ead5 (diff)
downloadsrc-test2-071183ef48062f3d4cd317aac2b7639dc2d70dc9.tar.gz
src-test2-071183ef48062f3d4cd317aac2b7639dc2d70dc9.zip
Notes
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssl/crypto/buffer/buffer.c2
-rw-r--r--crypto/openssl/ssl/s3_srvr.c15
2 files changed, 8 insertions, 9 deletions
diff --git a/crypto/openssl/crypto/buffer/buffer.c b/crypto/openssl/crypto/buffer/buffer.c
index 0335d48f68af..3b4c79f7048c 100644
--- a/crypto/openssl/crypto/buffer/buffer.c
+++ b/crypto/openssl/crypto/buffer/buffer.c
@@ -166,7 +166,7 @@ int BUF_MEM_grow_clean(BUF_MEM *str, int len)
/* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
if (len > LIMIT_BEFORE_EXPANSION)
{
- BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE);
+ BUFerr(BUF_F_BUF_MEM_GROW_CLEAN,ERR_R_MALLOC_FAILURE);
return 0;
}
n=(len+3)/3*4;
diff --git a/crypto/openssl/ssl/s3_srvr.c b/crypto/openssl/ssl/s3_srvr.c
index 24e4991098f5..36d929be230c 100644
--- a/crypto/openssl/ssl/s3_srvr.c
+++ b/crypto/openssl/ssl/s3_srvr.c
@@ -698,14 +698,6 @@ int ssl3_check_client_hello(SSL *s)
int ok;
long n;
- /* We only allow the client to restart the handshake once per
- * negotiation. */
- if (s->s3->flags & SSL3_FLAGS_SGC_RESTART_DONE)
- {
- SSLerr(SSL_F_SSL3_CHECK_CLIENT_HELLO, SSL_R_MULTIPLE_SGC_RESTARTS);
- return -1;
- }
-
/* this function is called when we really expect a Certificate message,
* so permit appropriate message length */
n=s->method->ssl_get_message(s,
@@ -718,6 +710,13 @@ int ssl3_check_client_hello(SSL *s)
s->s3->tmp.reuse_message = 1;
if (s->s3->tmp.message_type == SSL3_MT_CLIENT_HELLO)
{
+ /* We only allow the client to restart the handshake once per
+ * negotiation. */
+ if (s->s3->flags & SSL3_FLAGS_SGC_RESTART_DONE)
+ {
+ SSLerr(SSL_F_SSL3_CHECK_CLIENT_HELLO, SSL_R_MULTIPLE_SGC_RESTARTS);
+ return -1;
+ }
/* Throw away what we have done so far in the current handshake,
* which will now be aborted. (A full SSL_clear would be too much.) */
#ifndef OPENSSL_NO_DH