Compare commits
3 Commits
4fb1301051
...
2c4916a621
Author | SHA1 | Date |
---|---|---|
Benjamin Dauvergne | 2c4916a621 | |
Benjamin Dauvergne | 873c1e1cbd | |
Benjamin Dauvergne | a870f7d133 |
|
@ -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 (XMLSEC_MAJOR > 1) || (XMLSEC_MAJOR == 1 && XMLSEC_MINOR > 2) || (XMLSEC_MAJOR == 1 && XMLSEC_MINOR == 2 && XMLSEC_SUBMINOR > 36)
|
||||
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 (XMLSEC_MAJOR > 1) || (XMLSEC_MAJOR == 1 && XMLSEC_MINOR > 2) || (XMLSEC_MAJOR == 1 && XMLSEC_MINOR == 2 && XMLSEC_SUBMINOR > 36)
|
||||
return xmlSecCryptoAppKeyLoadEx(private_key_file, xmlSecKeyDataTypePrivate | xmlSecKeyDataTypePublic,
|
||||
xmlSecKeyDataFormatPem, NULL, NULL, NULL);
|
||||
#else
|
||||
return xmlSecCryptoAppKeyLoadEx(private_key_file,
|
||||
xmlSecKeyDataFormatPem, NULL, NULL, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue