mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 12:41:29 +00:00
tests: extend workaround for gnutls private key loading failure
In gnutls 3.4.3 there is a regression in the loading of private keys via gnutls_x509_privkey_import. We already have a workaround to deal with failures on older gnutls, but the error code that the new gnutls returns is different. Extend the workaround so that is checks for GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE too. See also gnutls https://bugzilla.redhat.com/show_bug.cgi?id=1250020 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
36025c552c
commit
3433180ec8
@ -84,7 +84,8 @@ static gnutls_x509_privkey_t testTLSLoadKey(void)
|
|||||||
|
|
||||||
if ((err = gnutls_x509_privkey_import(key, &data,
|
if ((err = gnutls_x509_privkey_import(key, &data,
|
||||||
GNUTLS_X509_FMT_PEM)) < 0) {
|
GNUTLS_X509_FMT_PEM)) < 0) {
|
||||||
if (err != GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR) {
|
if (err != GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR &&
|
||||||
|
err != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
|
||||||
VIR_WARN("Failed to import key %s", gnutls_strerror(err));
|
VIR_WARN("Failed to import key %s", gnutls_strerror(err));
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user