Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-07-27 01:03:08 +0300
committerCQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>2016-07-27 01:32:18 +0300
commit1d4f4c0123268eee5d83921adc8503cd1b8d6c93 (patch)
tree1b48937a3774eabafd82b7b074a95132668efa03 /include/openssl/ssl.h
parentabaef2e869fefcb0fac237bdf1b96c16ce8e290b (diff)
Add SSL_send_fatal_alert.
WebRTC want to be able to send a random alert. Add an API for this. Change-Id: Id3113d68f25748729fd9e9a91dbbfa93eead12c3 Reviewed-on: https://boringssl-review.googlesource.com/8950 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Diffstat (limited to 'include/openssl/ssl.h')
-rw-r--r--include/openssl/ssl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index e7a28385..22042f93 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -2687,6 +2687,16 @@ OPENSSL_EXPORT const char *SSL_alert_type_string_long(int value);
* alert description or "unknown" if unknown. */
OPENSSL_EXPORT const char *SSL_alert_desc_string_long(int value);
+/* SSL_send_fatal_alert sends a fatal alert over |ssl| of the specified type,
+ * which should be one of the |SSL_AD_*| constants. It returns one on success
+ * and <= 0 on error. The caller should pass the return value into
+ * |SSL_get_error| to determine how to proceed. Once this function has been
+ * called, future calls to |SSL_write| will fail.
+ *
+ * If retrying a failed operation due to |SSL_ERROR_WANT_WRITE|, subsequent
+ * calls must use the same |alert| parameter. */
+OPENSSL_EXPORT int SSL_send_fatal_alert(SSL *ssl, uint8_t alert);
+
/* ex_data functions.
*