mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +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 ();
|
rsa = RSA_new ();
|
||||||
if (rsa != NULL) {
|
if (rsa != NULL) {
|
||||||
BIGNUM *e = BN_new ();
|
BIGNUM *e = BN_new ();
|
||||||
if (e != NULL && BN_set_word (e, RSA_F4)
|
if (e == NULL || !BN_set_word (e, RSA_F4)
|
||||||
&& RSA_generate_key_ex (rsa, 2048, e, NULL)) {
|
|| !RSA_generate_key_ex (rsa, 2048, e, NULL)) {
|
||||||
RSA_free (rsa);
|
RSA_free (rsa);
|
||||||
rsa = NULL;
|
rsa = NULL;
|
||||||
}
|
}
|
||||||
BN_free (e);
|
if (e)
|
||||||
|
BN_free (e);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue