summaryrefslogtreecommitdiffstats
path: root/ssl/statem/extensions.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-06-07 15:14:36 +0100
committerMatt Caswell <matt@openssl.org>2018-07-02 15:06:12 +0100
commitc9598459b6c797bd316e44834f5129bdf28add2b (patch)
treefc35179840bc84813873a2f59f3b46148cd0414c /ssl/statem/extensions.c
parent5d263fb78b51f96753056f21abc4d992d0219df2 (diff)
Add setters to set the early_data callback
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6469)
Diffstat (limited to 'ssl/statem/extensions.c')
-rw-r--r--ssl/statem/extensions.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c
index 496039e3d4..5309b12703 100644
--- a/ssl/statem/extensions.c
+++ b/ssl/statem/extensions.c
@@ -1622,7 +1622,10 @@ static int final_early_data(SSL *s, unsigned int context, int sent)
|| s->session->ext.tick_identity != 0
|| s->early_data_state != SSL_EARLY_DATA_ACCEPTING
|| !s->ext.early_data_ok
- || s->hello_retry_request != SSL_HRR_NONE) {
+ || s->hello_retry_request != SSL_HRR_NONE
+ || (s->ctx->allow_early_data_cb != NULL
+ && !s->ctx->allow_early_data_cb(s,
+ s->ctx->allow_early_data_cb_data))) {
s->ext.early_data = SSL_EARLY_DATA_REJECTED;
} else {
s->ext.early_data = SSL_EARLY_DATA_ACCEPTED;