if (isPemFormat == true)
{
PublicKey nKey;
- r = nKey.SetKey(*pOutBuffer);
+ r = nKey.SetKey(*pOutBuffer.get());
SysTryCatch(NID_SEC, !IsFailed(r), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
- pOutBuffer.reset(ConvertDerToPemN(format, nKey));
- //pOutBuffer = std::unique_ptr< ByteBuffer >(ConvertDerToPemN(format, nKey));
+ pOutBuffer = std::unique_ptr< ByteBuffer >(ConvertDerToPemN(format, nKey));
SysTryCatch(NID_SEC, pOutBuffer != null, r = GetLastResult(), GetLastResult(), "[%s] Failed to convert der to pem encoded byte buffer");
}