Commit 85ad5f46 authored by Andre Pinto's avatar Andre Pinto Committed by Facebook Github Bot

Avoid implicitly dropping const modifier

Summary: Use const_cast instead of implicitly dropping const modifier.

Reviewed By: reanimus

Differential Revision: D6269200

fbshipit-source-id: 61e1708c88a4139d3fdd9cf89f4ff778d0354bb2
parent b58cbabb
...@@ -199,7 +199,8 @@ std::unique_ptr<IOBuf> OpenSSLCertUtils::derEncode(X509& x509) { ...@@ -199,7 +199,8 @@ std::unique_ptr<IOBuf> OpenSSLCertUtils::derEncode(X509& x509) {
std::vector<X509UniquePtr> OpenSSLCertUtils::readCertsFromBuffer( std::vector<X509UniquePtr> OpenSSLCertUtils::readCertsFromBuffer(
ByteRange range) { ByteRange range) {
BioUniquePtr b(BIO_new_mem_buf(range.data(), range.size())); BioUniquePtr b(
BIO_new_mem_buf(const_cast<unsigned char*>(range.data()), range.size()));
if (!b) { if (!b) {
throw std::runtime_error("failed to create BIO"); throw std::runtime_error("failed to create BIO");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment