diff options
author | Matt Caswell <matt@openssl.org> | 2017-01-18 16:28:23 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-01-30 10:18:21 +0000 |
commit | 1053a6e2281d81cd5d04d2d90da2c4905c9c3561 (patch) | |
tree | 8e49f4bb9e6cf5b1ea1e7a9a24f72f88278b9c89 /ssl/ssl_ciph.c | |
parent | 71c94d3c6115ab853bbdc2e0e1e26da2c8aba76a (diff) |
Implement Server side of PSK extension parsing
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2259)
Diffstat (limited to 'ssl/ssl_ciph.c')
-rw-r--r-- | ssl/ssl_ciph.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 88b99cca14..d4145ba5da 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -2018,3 +2018,14 @@ int ssl_cipher_get_overhead(const SSL_CIPHER *c, size_t *mac_overhead, return 1; } + +const EVP_MD *ssl_cipher_get_handshake_md(int cipher_id) +{ + const SSL_CIPHER *cipher = ssl3_get_cipher_by_id(cipher_id); + if (cipher == NULL) { + /* Don't recognise this cipher */ + return NULL; + } + + return ssl_md(cipher->algorithm2); +} |