xml: export lasso_get_min_signature method function (#86076)
gitea/lasso/pipeline/head This commit looks good
Details
gitea/lasso/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ffaddeb015
commit
253e8abe7b
3
NEWS
3
NEWS
|
@ -4,8 +4,9 @@ NEWS
|
|||
Future
|
||||
------
|
||||
|
||||
- fix symbol deprecation of XMLSEC_CRYPTO macro in libxmlsec 1.3.0 (Patch
|
||||
- Fix symbol deprecation of XMLSEC_CRYPTO macro in libxmlsec 1.3.0 (Patch
|
||||
provided by Simo Sorce of RedHat) (#78280)
|
||||
- Annotate lasso_*_signature_method functions with LASSO_EXPORT (#86076)
|
||||
|
||||
2.8.2 - March 14th 2023
|
||||
-----------------------
|
||||
|
|
|
@ -117,35 +117,6 @@ typedef enum {
|
|||
LASSO_SIGNATURE_METHOD_LAST
|
||||
} LassoSignatureMethod;
|
||||
|
||||
/* signature method and hash strength */
|
||||
LassoSignatureMethod lasso_get_default_signature_method();
|
||||
|
||||
void lasso_set_default_signature_method(LassoSignatureMethod meth);
|
||||
|
||||
LassoSignatureMethod lasso_get_min_signature_method();
|
||||
|
||||
void lasso_set_min_signature_method(LassoSignatureMethod meth);
|
||||
|
||||
static inline gboolean
|
||||
lasso_validate_signature_method(LassoSignatureMethod signature_method)
|
||||
{
|
||||
return signature_method > (LassoSignatureMethod)LASSO_SIGNATURE_TYPE_NONE \
|
||||
&& signature_method < (LassoSignatureMethod)LASSO_SIGNATURE_METHOD_LAST;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
lasso_allowed_signature_method(LassoSignatureMethod signature_method)
|
||||
{
|
||||
return signature_method >= lasso_get_min_signature_method();
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
lasso_ok_signature_method(LassoSignatureMethod signature_method)
|
||||
{
|
||||
return lasso_validate_signature_method(signature_method) \
|
||||
&& lasso_allowed_signature_method(signature_method);
|
||||
}
|
||||
|
||||
typedef struct _LassoNode LassoNode;
|
||||
typedef struct _LassoNodeClass LassoNodeClass;
|
||||
typedef struct _LassoNodeClassData LassoNodeClassData;
|
||||
|
@ -242,6 +213,31 @@ LASSO_EXPORT LassoKeyEncryptionMethod lasso_get_default_key_encryption_method();
|
|||
|
||||
LASSO_EXPORT void lasso_set_default_key_encryption_method(LassoKeyEncryptionMethod method);
|
||||
|
||||
/* signature method and hash strength */
|
||||
LASSO_EXPORT LassoSignatureMethod lasso_get_min_signature_method();
|
||||
|
||||
void lasso_set_min_signature_method(LassoSignatureMethod meth);
|
||||
|
||||
static inline gboolean
|
||||
lasso_validate_signature_method(LassoSignatureMethod signature_method)
|
||||
{
|
||||
return signature_method > (LassoSignatureMethod)LASSO_SIGNATURE_TYPE_NONE \
|
||||
&& signature_method < (LassoSignatureMethod)LASSO_SIGNATURE_METHOD_LAST;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
lasso_allowed_signature_method(LassoSignatureMethod signature_method)
|
||||
{
|
||||
return signature_method >= lasso_get_min_signature_method();
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
lasso_ok_signature_method(LassoSignatureMethod signature_method)
|
||||
{
|
||||
return lasso_validate_signature_method(signature_method) \
|
||||
&& lasso_allowed_signature_method(signature_method);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
|
Loading…
Reference in New Issue