mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
dtlscertificate: Fix error checking in RSA_generate_key_ex() usage
Was broken during the port for OpenSSL 1.1. https://bugzilla.gnome.org/show_bug.cgi?id=774328
This commit is contained in:
parent
83d8f1eb20
commit
3a069193e2
1 changed files with 4 additions and 3 deletions
|
@ -207,12 +207,13 @@ init_generated (GstDtlsCertificate * self)
|
|||
rsa = RSA_new ();
|
||||
if (rsa != NULL) {
|
||||
BIGNUM *e = BN_new ();
|
||||
if (e != NULL && BN_set_word (e, RSA_F4)
|
||||
&& RSA_generate_key_ex (rsa, 2048, e, NULL)) {
|
||||
if (e == NULL || !BN_set_word (e, RSA_F4)
|
||||
|| !RSA_generate_key_ex (rsa, 2048, e, NULL)) {
|
||||
RSA_free (rsa);
|
||||
rsa = NULL;
|
||||
}
|
||||
BN_free (e);
|
||||
if (e)
|
||||
BN_free (e);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue