]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: jws: add new functions in jws.h
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 17 Mar 2025 10:51:52 +0000 (11:51 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 17 Mar 2025 10:51:52 +0000 (11:51 +0100)
Add signatures of jws_b64_payload(), jws_b64_protected(),
jws_b64_signature(), jws_flattened() which allows to create a complete
JWS flattened object.

include/haproxy/jws.h

index 5f3c613b58f01bdad1f01c1be73f5b1cdad64f6d..34dd0ae4b161d3b3e6f5d149354be822128d3a7f 100644 (file)
@@ -3,7 +3,14 @@
 #ifndef _HAPROXY_JWK_H_
 #define _HAPROXY_JWK_H_
 
+#include <haproxy/openssl-compat.h>
+
 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_ */