xmlsec: replace xmlSecCryptoAppKeyLoad by xmlSecCryptoAppKeyLoadEx (#85339)

xmlSecCryptoAppKeyLoad was removed from libxmlsec1 in version >= 1.3.3:

  (xmlsec-core) Removed previously deprecated functions, defines, etc.

xmlSecCryptoAppKeyLoadEx was introduced in libxmlsec in version 1.3.0.
This commit is contained in:
Benjamin Dauvergne 2024-01-24 18:51:57 +01:00
parent 1ca8e8699c
commit 66c9f50f1f
1 changed files with 10 additions and 0 deletions

View File

@ -310,8 +310,13 @@ xmlSecKeyPtr lasso_get_public_key_from_pem_file(const char *file) {
pub_key = lasso_get_public_key_from_pem_cert_file(file);
break;
case LASSO_PEM_FILE_TYPE_PUB_KEY:
#if LASSO_XMLSEC_VERSION_NUMBER >= 0x010300
pub_key = xmlSecCryptoAppKeyLoadEx(file, xmlSecKeyDataTypePublic | xmlSecKeyDataTypePrivate,
xmlSecKeyDataFormatPem, NULL, NULL, NULL);
#else
pub_key = xmlSecCryptoAppKeyLoad(file,
xmlSecKeyDataFormatPem, NULL, NULL, NULL);
#endif
break;
case LASSO_PEM_FILE_TYPE_PRIVATE_KEY:
pub_key = lasso_get_public_key_from_private_key_file(file);
@ -379,8 +384,13 @@ lasso_get_public_key_from_pem_cert_file(const char *pem_cert_file)
static xmlSecKeyPtr
lasso_get_public_key_from_private_key_file(const char *private_key_file)
{
#if LASSO_XMLSEC_VERSION_NUMBER >= 0x010300
return xmlSecCryptoAppKeyLoadEx(private_key_file, xmlSecKeyDataTypePrivate | xmlSecKeyDataTypePublic,
xmlSecKeyDataFormatPem, NULL, NULL, NULL);
#else
return xmlSecCryptoAppKeyLoad(private_key_file,
xmlSecKeyDataFormatPem, NULL, NULL, NULL);
#endif
}
/**