1 diff --git a/ssl/sslinfo.c b/ssl/sslinfo.c
2 index 00f2f38..ba230d2 100644
5 @@ -350,8 +350,13 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd,
9 + ssl_GetRecvBufLock(ss);
10 + ssl_GetSSL3HandshakeLock(ss);
12 if (ss->version < SSL_LIBRARY_VERSION_3_1_TLS) {
13 PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_VERSION);
14 + ssl_ReleaseSSL3HandshakeLock(ss);
15 + ssl_ReleaseRecvBufLock(ss);
19 @@ -362,13 +367,17 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd,
21 val = PORT_Alloc(valLen);
23 + ssl_ReleaseSSL3HandshakeLock(ss);
24 + ssl_ReleaseRecvBufLock(ss);
29 PORT_Memcpy(val + i, &ss->ssl3.hs.client_random.rand, SSL3_RANDOM_LENGTH);
30 i += SSL3_RANDOM_LENGTH;
31 PORT_Memcpy(val + i, &ss->ssl3.hs.server_random.rand, SSL3_RANDOM_LENGTH);
32 i += SSL3_RANDOM_LENGTH;
35 val[i++] = contextLen >> 8;
36 val[i++] = contextLen;
37 @@ -389,6 +398,8 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd,
40 ssl_ReleaseSpecReadLock(ss);
41 + ssl_ReleaseSSL3HandshakeLock(ss);
42 + ssl_ReleaseRecvBufLock(ss);
44 PORT_ZFree(val, valLen);