From: Aditya Banavi <[email protected]>

Use SECP256R1 ec curve when generating private key during DTLS negotiation.

Signed-off-by: Aditya Banavi <[email protected]>
---
 libavformat/tls_gnutls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index 778ca9cf40..e294aef0c0 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -197,7 +197,7 @@ static int gnutls_gen_private_key(gnutls_x509_privkey_t 
*key)
     }
 
     ret = gnutls_x509_privkey_generate(*key, GNUTLS_PK_ECDSA,
-                                       
gnutls_sec_param_to_pk_bits(GNUTLS_PK_ECDSA, GNUTLS_SEC_PARAM_MEDIUM), 0);
+                                       
GNUTLS_CURVE_TO_BITS(GNUTLS_ECC_CURVE_SECP256R1), 0);
     if (ret < 0) {
         av_log(NULL, AV_LOG_ERROR, "TLS: Failed to generate private key: 
%s\n", gnutls_strerror(ret));
         goto einval_end;
-- 
2.43.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to