diff options
author | Simon Josefsson <simon@josefsson.org> | 2006-07-13 07:27:41 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2006-07-13 07:27:41 +0000 |
commit | 5a91cc1aab63bf5ca18eb18a4c00b2914c1b6831 (patch) | |
tree | 3aea5db33e3cada2ca1f1a09283d6fae61b1d716 | |
parent | cfdb897b9ace988c5d29d63bc69a3f2e45183c77 (diff) | |
download | gnutls-5a91cc1aab63bf5ca18eb18a4c00b2914c1b6831.tar.gz |
Retry handshake on non-fatal errors, tiny patch from Jefferson Ogata
<Jefferson.Ogata@noaa.gov>.
-rw-r--r-- | libextra/gnutls_openssl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libextra/gnutls_openssl.c b/libextra/gnutls_openssl.c index bf273b6b17..d73f9dcb94 100644 --- a/libextra/gnutls_openssl.c +++ b/libextra/gnutls_openssl.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005 Free Software Foundation + * Copyright (C) 2004, 2005, 2006 Free Software Foundation * Copyright (c) 2002 Andrew McDonald <andrew@mcdonald.org.uk> * * This file is part of GNUTLS-EXTRA. @@ -373,7 +373,9 @@ SSL_connect (SSL * ssl) ssl->ctx->method->protocol_priority); } - err = gnutls_handshake (ssl->gnutls_state); + do + err = gnutls_handshake (ssl->gnutls_state); + while (ret < 0 && gnutls_error_is_fatal (ret) == 0); ssl->last_error = err; if (err < 0) @@ -430,7 +432,9 @@ SSL_accept (SSL * ssl) /* FIXME: dh params, do we want client cert? */ - err = gnutls_handshake (ssl->gnutls_state); + do + err = gnutls_handshake (ssl->gnutls_state); + while (ret < 0 && gnutls_error_is_fatal (ret) == 0); ssl->last_error = err; if (err < 0) |