Fix old style cast warning.

This commit is contained in:
Pentarctagon 2021-11-17 12:06:03 -06:00
parent 76fda0bf3d
commit a60024a805
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,
(const unsigned char **)&pContext->pbCertEncoded,
static_cast<const unsigned char **>(&pContext->pbCertEncoded),
pContext->cbCertEncoded);
if(x509 != NULL) {
X509_STORE_add_cert(store, x509);