static_cast > const_cast.

This commit is contained in:
Pentarctagon 2021-11-17 15:22:38 -06:00
parent a60024a805
commit 178efca3a3
No known key found for this signature in database
GPG key ID: 9456BC54A21DBFA0

View file

@ -41,7 +41,7 @@ void load_tls_root_certs(boost::asio::ssl::context &ctx)
PCCERT_CONTEXT pContext = NULL;
while ((pContext = CertEnumCertificatesInStore(hStore, pContext)) != NULL) {
X509 *x509 = d2i_X509(NULL,
static_cast<const unsigned char **>(&pContext->pbCertEncoded),
const_cast<const unsigned char**>(&pContext->pbCertEncoded),
pContext->cbCertEncoded);
if(x509 != NULL) {
X509_STORE_add_cert(store, x509);