|
libwebsockets
Lightweight C library for HTML5 websockets
|
Go to the source code of this file.
Data Structures | |
| struct | lws_jose_jwe_alg |
| struct | lws_jws_recpient |
| struct | lws_jose |
Macros | |
| #define | LWS_JWS_MAX_RECIPIENTS 3 |
Functions | |
| LWS_VISIBLE LWS_EXTERN void | lws_jose_init (struct lws_jose *jose) |
| LWS_VISIBLE LWS_EXTERN void | lws_jose_destroy (struct lws_jose *jose) |
| LWS_VISIBLE LWS_EXTERN int | lws_gencrypto_jws_alg_to_definition (const char *alg, const struct lws_jose_jwe_alg **jose) |
| LWS_VISIBLE LWS_EXTERN int | lws_gencrypto_jwe_alg_to_definition (const char *alg, const struct lws_jose_jwe_alg **jose) |
| LWS_VISIBLE LWS_EXTERN int | lws_gencrypto_jwe_enc_to_definition (const char *enc, const struct lws_jose_jwe_alg **jose) |
| LWS_VISIBLE LWS_EXTERN int | lws_jws_parse_jose (struct lws_jose *jose, const char *buf, int len, char *temp, int *temp_len) |
| LWS_VISIBLE LWS_EXTERN int | lws_jwe_parse_jose (struct lws_jose *jose, const char *buf, int len, char *temp, int *temp_len) |
| struct lws_jose_jwe_alg |
Definition at line 80 of file lws-jose.h.
Collaboration diagram for lws_jose_jwe_alg:| Data Fields | ||
|---|---|---|
| enum lws_genhash_types | hash_type | |
| enum lws_genhmac_types | hmac_type | |
| enum lws_jose_algtype | algtype_signing | |
| enum lws_jose_algtype | algtype_crypto | |
| const char * | alg | |
| const char * | curve_name | |
| unsigned short | keybits_min | |
| unsigned short | keybits_fixed | |
| unsigned short | ivbits | |
| struct lws_jws_recpient |
Definition at line 106 of file lws-jose.h.
Collaboration diagram for lws_jws_recpient:| Data Fields | ||
|---|---|---|
| struct lws_gencrypto_keyelem | unprot[LWS_COUNT_JOSE_HDR_ELEMENTS] | |
| struct lws_jwk | jwk_ephemeral | |
| struct lws_jwk | jwk | |
| struct lws_jose |
Definition at line 116 of file lws-jose.h.
Collaboration diagram for lws_jose:| Data Fields | ||
|---|---|---|
| struct lws_gencrypto_keyelem | e[LWS_COUNT_JOSE_HDR_ELEMENTS] | |
| struct lws_jws_recpient | recipient[LWS_JWS_MAX_RECIPIENTS] | |
| char | typ[32] | |
| char | edone[LWS_COUNT_JOSE_HDR_ELEMENTS] | |
| const struct lws_jose_jwe_alg * | alg | |
| const struct lws_jose_jwe_alg * | enc_alg | |
| int | recipients | |
| #define LWS_JWS_MAX_RECIPIENTS 3 |
Definition at line 104 of file lws-jose.h.
Definition at line 25 of file lws-jose.h.
| enum lws_jose_algtype |
Definition at line 58 of file lws-jose.h.
| LWS_VISIBLE LWS_EXTERN void lws_jose_init | ( | struct lws_jose * | jose | ) |
lws_jose_init() - prepare a struct lws_jose for use
| jose | the jose header struct to prepare |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_jose_destroy | ( | struct lws_jose * | jose | ) |
lws_jose_destroy() - retire a struct lws_jose from use
| jose | the jose header struct to destroy |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_gencrypto_jws_alg_to_definition | ( | const char * | alg, |
| const struct lws_jose_jwe_alg ** | jose ) |
lws_gencrypto_jws_alg_to_definition() - look up a jws alg name
| alg | the jws alg name |
| jose | pointer to the pointer to the info struct to set on success |
Returns 0 if *jose set, else nonzero for failure
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_gencrypto_jwe_alg_to_definition | ( | const char * | alg, |
| const struct lws_jose_jwe_alg ** | jose ) |
lws_gencrypto_jwe_alg_to_definition() - look up a jwe alg name
| alg | the jwe alg name |
| jose | pointer to the pointer to the info struct to set on success |
Returns 0 if *jose set, else nonzero for failure
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_gencrypto_jwe_enc_to_definition | ( | const char * | enc, |
| const struct lws_jose_jwe_alg ** | jose ) |
lws_gencrypto_jwe_enc_to_definition() - look up a jwe enc name
| alg | the jwe enc name |
| jose | pointer to the pointer to the info struct to set on success |
Returns 0 if *jose set, else nonzero for failure
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_jws_parse_jose | ( | struct lws_jose * | jose, |
| const char * | buf, | ||
| int | len, | ||
| char * | temp, | ||
| int * | temp_len ) |
lws_jws_parse_jose() - parse a JWS JOSE header
| jose | the jose struct to set to parsing results |
| buf | the raw JOSE header |
| len | the length of the raw JOSE header |
| temp | parent-owned buffer to "allocate" elements into |
| temp_len | amount of space available in temp |
returns 0 for success, or -1 for error *temp_len is updated to reflect the amount of temp used if successful.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_jwe_parse_jose | ( | struct lws_jose * | jose, |
| const char * | buf, | ||
| int | len, | ||
| char * | temp, | ||
| int * | temp_len ) |
lws_jwe_parse_jose() - parse a JWE JOSE header
| jose | the jose struct to set to parsing results |
| buf | the raw JOSE header |
| len | the length of the raw JOSE header |
| temp | parent-owned buffer to "allocate" elements into |
| temp_len | amount of space available in temp |
returns 0 for success, or -1 for error *temp_len is updated to reflect the amount of temp used if successful.