summaryrefslogtreecommitdiff
path: root/extra/yassl/src/ssl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extra/yassl/src/ssl.cpp')
-rw-r--r--extra/yassl/src/ssl.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp
index 86dfa1c6ebd..c3d580a93ab 100644
--- a/extra/yassl/src/ssl.cpp
+++ b/extra/yassl/src/ssl.cpp
@@ -411,8 +411,10 @@ int SSL_clear(SSL* ssl)
int SSL_shutdown(SSL* ssl)
{
- Alert alert(warning, close_notify);
- sendAlert(*ssl, alert);
+ if (!ssl->GetQuietShutdown()) {
+ Alert alert(warning, close_notify);
+ sendAlert(*ssl, alert);
+ }
ssl->useLog().ShowTCP(ssl->getSocket().get_fd(), true);
GetErrors().Remove();
@@ -421,6 +423,18 @@ int SSL_shutdown(SSL* ssl)
}
+void SSL_set_quiet_shutdown(SSL *ssl,int mode)
+{
+ ssl->SetQuietShutdown(mode != 0);
+}
+
+
+int SSL_get_quiet_shutdown(SSL *ssl)
+{
+ return ssl->GetQuietShutdown();
+}
+
+
/* on by default but allow user to turn off */
long SSL_CTX_set_session_cache_mode(SSL_CTX* ctx, long mode)
{