tls/openssl: fix openssl-3.0.0 support
3.0.0 includes the "id-on-xmppAddr" object and OBJ_create() returns NID_undef if we try to create a new one.
This commit is contained in:
@@ -632,6 +632,9 @@ static X509 *_tls_cert_read(xmpp_conn_t *conn)
|
|||||||
static int _tls_xaddr_nid(void)
|
static int _tls_xaddr_nid(void)
|
||||||
{
|
{
|
||||||
static int xaddr_nid = NID_undef;
|
static int xaddr_nid = NID_undef;
|
||||||
|
if (xaddr_nid == NID_undef) {
|
||||||
|
xaddr_nid = OBJ_sn2nid("id-on-xmppAddr");
|
||||||
|
}
|
||||||
if (xaddr_nid == NID_undef) {
|
if (xaddr_nid == NID_undef) {
|
||||||
xaddr_nid = OBJ_create("1.3.6.1.5.5.7.8.5", "id-on-xmppAddr",
|
xaddr_nid = OBJ_create("1.3.6.1.5.5.7.8.5", "id-on-xmppAddr",
|
||||||
"XmppAddr Identifier");
|
"XmppAddr Identifier");
|
||||||
|
|||||||
Reference in New Issue
Block a user