You are not logged in.
Pages: 1
Hi @ab, I found a bug in the function mormot.crypt.openssl.OpenSslLoad.
function OpenSslLoad(const Cert: RawByteString): ICryptCert;
var
x: PX509;
der: RawByteString;
begin
result := nil;
der := PemToDer(Cert);
if not AsnDecChunk(der) then // basic input validation !!! HERE, the parameter must be `der` instead of `Cert`
exit;
x := LoadCertificate(der);
if x <> nil then
result := CryptCertOpenSsl[X509Algo(x)].FromHandle(x);
end;
Esteban
Offline
You are right.
It should be fixed with
https://github.com/synopse/mORMot2/commit/52d3af0f
Offline
Pages: 1