jeroen / openssl

OpenSSL bindings for R
Other
63 stars 22 forks source link

tests: expected message for read_key() without password #100

Closed xypron closed 2 years ago

xypron commented 2 years ago

With OpenSSL 3.0.2 read_key() with a NULL password will create an error message like

OpenSSL error: 408CA279B07F0000:error:11800074:PKCS12
routines:PKCS12_pbe_crypt_ex:pkcs12 cipherfinal
error:../crypto/pkcs12/p12_decr.c:86:empty password\nk.c:124:\n"

which does not contain the word "bad". Adjust the test to look for "password" instead.

Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com

jeroen commented 2 years ago

Thanks. I think we need to check for either "bad" or "password" then. In old versions of openssl the message is something like "bad decrypt"

xypron commented 2 years ago

OpenSSL 3.0.1 gives us "bad password". "bad" and "empty" should be good values for testing.

jeroen commented 2 years ago

Thanks!