Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
40bf7b00ec |
@ -82,11 +82,6 @@ namespace ix
|
|||||||
errMsg = "Cannot parse key file '" + _tlsOptions.keyFile + "'";
|
errMsg = "Cannot parse key file '" + _tlsOptions.keyFile + "'";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (mbedtls_ssl_conf_own_cert(&_conf, &_cert, &_pkey) < 0)
|
|
||||||
{
|
|
||||||
errMsg = "Problem configuring cert '" + _tlsOptions.certFile + "'";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_tlsOptions.isPeerVerifyDisabled())
|
if (_tlsOptions.isPeerVerifyDisabled())
|
||||||
@ -110,6 +105,11 @@ namespace ix
|
|||||||
}
|
}
|
||||||
|
|
||||||
mbedtls_ssl_conf_ca_chain(&_conf, &_cacert, NULL);
|
mbedtls_ssl_conf_ca_chain(&_conf, &_cacert, NULL);
|
||||||
|
|
||||||
|
if (_tlsOptions.hasCertAndKey())
|
||||||
|
{
|
||||||
|
mbedtls_ssl_conf_own_cert(&_conf, &_cert, &_pkey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mbedtls_ssl_setup(&_ssl, &_conf) != 0)
|
if (mbedtls_ssl_setup(&_ssl, &_conf) != 0)
|
||||||
|
Reference in New Issue
Block a user