diff options
author | EKR <ekr@rtfm.com> | 2016-12-02 14:43:49 -0500 |
---|---|---|
committer | EKR <ekr@rtfm.com> | 2016-12-02 14:43:49 -0500 |
commit | dc7ad091212db63eed4505c73c937c404250d04d (patch) | |
tree | dabb298528fa5d920aee261f71c90eff52e20030 /gtests/ssl_gtest/libssl_internals.c | |
parent | 65ab54b2eaf002aed7ec4e94ffe8aabe01005530 (diff) | |
download | nss-hg-dc7ad091212db63eed4505c73c937c404250d04d.tar.gz |
Bug 1372001 - Refactor out encrypt-to-self into a self-contained
interface. r=mt
Summary:
This cleans up the ticket encryption code and also prepares us for
encrypt-to-self for hash state with HRR. Note that I eventually plan
to move the self encrypt management functions from sslsnce.c, but I
want to do it in a followup patch to make seeing the changes here
(mostly rename in that block) easier.
Reviewers: mt
Differential Revision: https://nss-review.dev.mozaws.net/D329
Diffstat (limited to 'gtests/ssl_gtest/libssl_internals.c')
-rw-r--r-- | gtests/ssl_gtest/libssl_internals.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gtests/ssl_gtest/libssl_internals.c b/gtests/ssl_gtest/libssl_internals.c index 32ffcb6f4..97b8354ae 100644 --- a/gtests/ssl_gtest/libssl_internals.c +++ b/gtests/ssl_gtest/libssl_internals.c @@ -10,6 +10,7 @@ #include "nss.h" #include "pk11pub.h" #include "seccomon.h" +#include "selfencrypt.h" SECStatus SSLInt_IncrementClientHandshakeVersion(PRFileDesc *fd) { sslSocket *ss = ssl_FindSocket(fd); @@ -55,7 +56,16 @@ PRBool SSLInt_ExtensionNegotiated(PRFileDesc *fd, PRUint16 ext) { return (PRBool)(ss && ssl3_ExtensionNegotiated(ss, ext)); } -void SSLInt_ClearSessionTicketKey() { ssl_ResetSessionTicketKeys(); } +void SSLInt_ClearSelfEncryptKey() { ssl_ResetSelfEncryptKeys(); } + +sslSelfEncryptKeys *ssl_GetSelfEncryptKeysInt(); + +void SSLInt_SetSelfEncryptMacKey(PK11SymKey *key) { + sslSelfEncryptKeys *keys = ssl_GetSelfEncryptKeysInt(); + + PK11_FreeSymKey(keys->macKey); + keys->macKey = key; +} SECStatus SSLInt_SetMTU(PRFileDesc *fd, PRUint16 mtu) { sslSocket *ss = ssl_FindSocket(fd); |