From: William Lallemand Date: Mon, 17 Mar 2025 10:51:52 +0000 (+0100) Subject: MINOR: jws: add new functions in jws.h X-Git-Tag: v3.2-dev8~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de67f25a7e9223f09cb6d8fe3561d2cbf11037f8;p=thirdparty%2Fhaproxy.git MINOR: jws: add new functions in jws.h Add signatures of jws_b64_payload(), jws_b64_protected(), jws_b64_signature(), jws_flattened() which allows to create a complete JWS flattened object. --- diff --git a/include/haproxy/jws.h b/include/haproxy/jws.h index 5f3c613b5..34dd0ae4b 100644 --- a/include/haproxy/jws.h +++ b/include/haproxy/jws.h @@ -3,7 +3,14 @@ #ifndef _HAPROXY_JWK_H_ #define _HAPROXY_JWK_H_ +#include + int bn2base64url(const BIGNUM *bn, char *dst, size_t dsize); int EVP_PKEY_to_pub_jwk(EVP_PKEY *pkey, char *dst, size_t dsize); +int jws_b64_payload(char *payload, char *dst, size_t dsize); +int jws_b64_protected(const char *alg, char *kid, char *jwk, char *nonce, char *url, char *dst, size_t dsize); +int jws_b64_signature(EVP_PKEY *pkey, char *b64protected, char *b64payload, char *dst, size_t dsize); +int jws_flattened(char *protected, char *payload, char *signature, char *dst, size_t dsize); + #endif /* ! _HAPROXY_JWK_H_ */