Fix SSL_export_keying_material() for DTLS1_BAD_VER
[openssl.git] / ssl / ssl_lib.c
index a707612fb0f9f73efd088b631b68e799c1346ab3..42b980ac26a05f658fe952da1299981bb4380a55 100644 (file)
@@ -1828,7 +1828,7 @@ int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
                                const unsigned char *p, size_t plen,
                                int use_context)
 {
-    if (s->version < TLS1_VERSION)
+    if (s->version < TLS1_VERSION && s->version != DTLS1_BAD_VER)
         return -1;
 
     return s->method->ssl3_enc->export_keying_material(s, out, olen, label,