mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-10-30 16:11:01 +01:00
jwk_thumbprint() is a function which is a function which implements RFC7368 and emits a JWK thumbprint using a EVP_PKEY. EVP_PKEY_EC_to_pub_jwk() and EVP_PKEY_RSA_to_pub_jwk() were changed in order to match what is required to emit a thumbprint (ie, no spaces or lines and the lexicographic order of the fields)
19 lines
819 B
C
19 lines
819 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
|
|
#ifndef _HAPROXY_JWK_H_
|
|
#define _HAPROXY_JWK_H_
|
|
|
|
#include <haproxy/openssl-compat.h>
|
|
#include <haproxy/jwt-t.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);
|
|
enum jwt_alg EVP_PKEY_to_jws_alg(EVP_PKEY *pkey);
|
|
int jws_b64_payload(char *payload, char *dst, size_t dsize);
|
|
int jws_b64_protected(enum jwt_alg alg, char *kid, char *jwk, char *nonce, char *url, char *dst, size_t dsize);
|
|
int jws_b64_signature(EVP_PKEY *pkey, enum jwt_alg alg, char *b64protected, char *b64payload, char *dst, size_t dsize);
|
|
int jws_flattened(char *protected, char *payload, char *signature, char *dst, size_t dsize);
|
|
int jws_thumbprint(EVP_PKEY *pkey, char *dst, size_t dsize);
|
|
|
|
#endif /* ! _HAPROXY_JWK_H_ */
|