microsoft / go-crypto-openssl

Go crypto backend for Linux using OpenSSL
MIT License
61 stars 15 forks source link

Initialize empty AES-GCM inputs #34

Closed qmuntal closed 2 years ago

qmuntal commented 2 years ago

This PR ensures AES-GCM seal and open empty inputs are initialized.

Uninitialized inputs did not trigger any test failure until now because most of OpenSSL compilations seem to handle them correctly.

Strangely, the OpenSSL binary packed in mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-20211022152710-047508b can't handle them, even though it uses OpenSSL 1.1.1, which causes this failure when running Go crypto tests.

I found this now thanks to https://github.com/microsoft/go/pull/655, which forces the OpenSSL backend even if FIPS is not enabled.