libfilezilla
Toggle main menu visibility
Loading...
Searching...
No Matches
lib
libfilezilla
jws.hpp
Go to the documentation of this file.
1
#ifndef LIBFILEZILLA_JWS_HEADER
2
#define LIBFILEZILLA_JWS_HEADER
3
7
8
#include "
json.hpp
"
9
10
namespace
fz
{
11
class
logger_interface
;
12
14
enum class
jwk_type
{
16
ecdsa
,
17
19
rsa
20
};
21
26
std::pair<json, json> FZ_PUBLIC_SYMBOL
create_jwk
(
jwk_type
t =
jwk_type::ecdsa
);
27
28
std::pair<json, json> FZ_PUBLIC_SYMBOL jwk_from_x509_privkey(std::string_view
const
& data,
bool
pem
=
true
,
logger_interface
* logger =
nullptr
);
29
41
json
FZ_PUBLIC_SYMBOL
jws_sign_flattened
(
json
const
& priv,
json
const
& payload,
json
const
& extra_protected = {});
42
43
std::string FZ_PUBLIC_SYMBOL create_jwt(json
const
& priv, json
const
& payload, json extra_protected = {});
44
}
45
46
#endif
fz::json
json parser/builder
Definition
json.hpp:33
fz::logger_interface
Abstract interface for logging strings.
Definition
logger.hpp:51
json.hpp
Simple json parser/builder.
fz
The namespace used by libfilezilla.
Definition
apply.hpp:17
fz::jwk_type
jwk_type
Algorithm of JWKs.
Definition
jws.hpp:14
fz::jwk_type::ecdsa
@ ecdsa
EC key type with P-256 as algorithm.
Definition
jws.hpp:16
fz::jwk_type::rsa
@ rsa
RSA key.
Definition
jws.hpp:19
fz::create_jwk
std::pair< json, json > create_jwk(jwk_type t=jwk_type::ecdsa)
Creates a JWK pair.
fz::jws_sign_flattened
json jws_sign_flattened(json const &priv, json const &payload, json const &extra_protected={})
Create a JWS, with optional protected data.
fz::tls_data_format::pem
@ pem
The provided data is in PEM format.
Definition
tls_params.hpp:144
Generated by
1.17.0