[gnutls-devel] GnuTLS | x509: regression in the error code returned on encrypted files (#1321)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Thu Feb 10 16:17:16 CET 2022

Craig commented:

The simplest fix would be to simply translate GNUTLS_E_PKCS11_PIN_ERROR into GNUTLS_E_DECRYPTION_FAILED where my patch calls _gnutls_retrieve_pin.  Though, it would be unfortunate to mask that error in the case one of the pin callbacks actually returns that error.

A better fix would be to only call _gnutls_retrieve_pin if a pin callback is actually registered.  I don't see a clean way of doing that without duplicating the callback existence checks that exist in _gnutls_retrieve_pin...

Yet another option would be to modify _gnutls_retrieve_pin to take another argument representing the error code it should return when no callbacks are registered...


Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1321#note_838791050
You're receiving this email because of your account on gitlab.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220210/d9ec856e/attachment.html>

More information about the Gnutls-devel mailing list