JWK, JWKS, JWS, JWE type

## Data Structures

struct | jws_t
struct | jwe_t
struct | jwt_t

## Macros

#define | RHONABWY_INTEGER_FORMAT JSON_INTEGER_FORMAT

## Typedefs

typedef json_t | jwk_t
typedef json_t | jwks_t
typedef json_int_t | rhn_int_t

## Enumerations

enum

jwa_alg {
R_JWA_ALG_UNKNOWN = 0 , R_JWA_ALG_NONE = 1 , R_JWA_ALG_HS256 = 2 , R_JWA_ALG_HS384 = 3 ,
R_JWA_ALG_HS512 = 4 , R_JWA_ALG_RS256 = 5 , R_JWA_ALG_RS384 = 6 , R_JWA_ALG_RS512 = 7 ,
R_JWA_ALG_ES256 = 8 , R_JWA_ALG_ES384 = 9 , R_JWA_ALG_ES512 = 10 , R_JWA_ALG_EDDSA = 11 ,
R_JWA_ALG_PS256 = 12 , R_JWA_ALG_PS384 = 13 , R_JWA_ALG_PS512 = 14 , R_JWA_ALG_RSA1_5 = 15 ,
R_JWA_ALG_RSA_OAEP = 16 , R_JWA_ALG_RSA_OAEP_256 = 17 , R_JWA_ALG_A128KW = 18 , R_JWA_ALG_A192KW = 19 ,
R_JWA_ALG_A256KW = 20 , R_JWA_ALG_DIR = 21 , R_JWA_ALG_ECDH_ES = 22 , R_JWA_ALG_ECDH_ES_A128KW = 23 ,
R_JWA_ALG_ECDH_ES_A192KW = 24 , R_JWA_ALG_ECDH_ES_A256KW = 25 , R_JWA_ALG_A128GCMKW = 26 , R_JWA_ALG_A192GCMKW = 27 ,
R_JWA_ALG_A256GCMKW = 28 , R_JWA_ALG_PBES2_H256 = 29 , R_JWA_ALG_PBES2_H384 = 30 , R_JWA_ALG_PBES2_H512 = 31 ,
R_JWA_ALG_ES256K = 32
}

enum | rhn_claim_opt { R_JWT_CLAIM_NOP = 0 , R_JWT_CLAIM_ISS = 1 , R_JWT_CLAIM_SUB = 2 , R_JWT_CLAIM_AUD = 3 , R_JWT_CLAIM_EXP = 4 , R_JWT_CLAIM_NBF = 5 , R_JWT_CLAIM_IAT = 6 , R_JWT_CLAIM_JTI = 7 , R_JWT_CLAIM_STR = 8 , R_JWT_CLAIM_INT = 9 , R_JWT_CLAIM_JSN = 10 , R_JWT_CLAIM_TYP = 11 , R_JWT_CLAIM_CTY = 12 }
enum | jwa_enc { R_JWA_ENC_UNKNOWN = 0 , R_JWA_ENC_A128CBC = 1 , R_JWA_ENC_A192CBC = 2 , R_JWA_ENC_A256CBC = 3 , R_JWA_ENC_A128GCM = 4 , R_JWA_ENC_A192GCM = 5 , R_JWA_ENC_A256GCM = 6 }

enum

rhn_opt {
RHN_OPT_NONE = 0 , RHN_OPT_HEADER_INT_VALUE = 1 , RHN_OPT_HEADER_RHN_INT_VALUE = 2 , RHN_OPT_HEADER_STR_VALUE = 3 ,
RHN_OPT_HEADER_JSON_T_VALUE = 4 , RHN_OPT_HEADER_FULL_JSON_T = 5 , RHN_OPT_HEADER_FULL_JSON_STR = 6 , RHN_OPT_UN_HEADER_FULL_JSON_T = 7 ,
RHN_OPT_UN_HEADER_FULL_JSON_STR = 8 , RHN_OPT_PAYLOAD = 9 , RHN_OPT_CLAIM_INT_VALUE = 10 , RHN_OPT_CLAIM_RHN_INT_VALUE = 11 ,
RHN_OPT_CLAIM_STR_VALUE = 12 , RHN_OPT_CLAIM_JSON_T_VALUE = 13 , RHN_OPT_CLAIM_FULL_JSON_T = 14 , RHN_OPT_CLAIM_FULL_JSON_STR = 15 ,
RHN_OPT_ENC_ALG = 16 , RHN_OPT_ENC = 17 , RHN_OPT_SIG_ALG = 18 , RHN_OPT_CIPHER_KEY = 19 ,
RHN_OPT_IV = 20 , RHN_OPT_AAD = 21 , RHN_OPT_SIGN_KEY_JWK = 22 , RHN_OPT_SIGN_KEY_JWKS = 23 ,
RHN_OPT_SIGN_KEY_GNUTLS = 24 , RHN_OPT_SIGN_KEY_JSON_T = 25 , RHN_OPT_SIGN_KEY_JSON_STR = 26 , RHN_OPT_SIGN_KEY_PEM_DER = 27 ,
RHN_OPT_VERIFY_KEY_JWK = 28 , RHN_OPT_VERIFY_KEY_JWKS = 29 , RHN_OPT_VERIFY_KEY_GNUTLS = 30 , RHN_OPT_VERIFY_KEY_JSON_T = 31 ,
RHN_OPT_VERIFY_KEY_JSON_STR = 32 , RHN_OPT_VERIFY_KEY_PEM_DER = 33 , RHN_OPT_ENCRYPT_KEY_JWK = 34 , RHN_OPT_ENCRYPT_KEY_JWKS = 35 ,
RHN_OPT_ENCRYPT_KEY_GNUTLS = 36 , RHN_OPT_ENCRYPT_KEY_JSON_T = 37 , RHN_OPT_ENCRYPT_KEY_JSON_STR = 38 , RHN_OPT_ENCRYPT_KEY_PEM_DER = 39 ,
RHN_OPT_DECRYPT_KEY_JWK = 40 , RHN_OPT_DECRYPT_KEY_JWKS = 41 , RHN_OPT_DECRYPT_KEY_GNUTLS = 42 , RHN_OPT_DECRYPT_KEY_JSON_T = 43 ,
RHN_OPT_DECRYPT_KEY_JSON_STR = 44 , RHN_OPT_DECRYPT_KEY_PEM_DER = 45
}

enum | rhn_import { R_IMPORT_NONE = 0 , R_IMPORT_JSON_STR = 1 , R_IMPORT_JSON_T = 2 , R_IMPORT_PEM = 3 , R_IMPORT_DER = 4 , R_IMPORT_G_PRIVKEY = 5 , R_IMPORT_G_PUBKEY = 6 , R_IMPORT_G_CERT = 7 , R_IMPORT_X5U = 8 , R_IMPORT_SYMKEY = 9 , R_IMPORT_PASSWORD = 10 , R_IMPORT_JKU = 11 }

## Detailed Description

Definition of the types jwk_t, jwks_t, jws_t and jwe_t

## Macro Definition Documentation

## RHONABWY_INTEGER_FORMAT

#define RHONABWY_INTEGER_FORMAT JSON_INTEGER_FORMAT

## Typedef Documentation

## jwk_t

typedef json_t jwk_t

## jwks_t

typedef json_t jwks_t

## rhn_int_t

typedef json_int_t rhn_int_t

## Enumeration Type Documentation

## jwa_alg

enum jwa_alg

Enumerator
R_JWA_ALG_UNKNOWN |
R_JWA_ALG_NONE |
R_JWA_ALG_HS256 |
R_JWA_ALG_HS384 |
R_JWA_ALG_HS512 |
R_JWA_ALG_RS256 |
R_JWA_ALG_RS384 |
R_JWA_ALG_RS512 |
R_JWA_ALG_ES256 |
R_JWA_ALG_ES384 |
R_JWA_ALG_ES512 |
R_JWA_ALG_EDDSA |
R_JWA_ALG_PS256 |
R_JWA_ALG_PS384 |
R_JWA_ALG_PS512 |
R_JWA_ALG_RSA1_5 |
R_JWA_ALG_RSA_OAEP |
R_JWA_ALG_RSA_OAEP_256 |
R_JWA_ALG_A128KW |
R_JWA_ALG_A192KW |
R_JWA_ALG_A256KW |
R_JWA_ALG_DIR |
R_JWA_ALG_ECDH_ES |
R_JWA_ALG_ECDH_ES_A128KW |
R_JWA_ALG_ECDH_ES_A192KW |
R_JWA_ALG_ECDH_ES_A256KW |
R_JWA_ALG_A128GCMKW |
R_JWA_ALG_A192GCMKW |
R_JWA_ALG_A256GCMKW |
R_JWA_ALG_PBES2_H256 |
R_JWA_ALG_PBES2_H384 |
R_JWA_ALG_PBES2_H512 |
R_JWA_ALG_ES256K |

## rhn_claim_opt

enum rhn_claim_opt

Enumerator
R_JWT_CLAIM_NOP |
R_JWT_CLAIM_ISS |
R_JWT_CLAIM_SUB |
R_JWT_CLAIM_AUD |
R_JWT_CLAIM_EXP |
R_JWT_CLAIM_NBF |
R_JWT_CLAIM_IAT |
R_JWT_CLAIM_JTI |
R_JWT_CLAIM_STR |
R_JWT_CLAIM_INT |
R_JWT_CLAIM_JSN |
R_JWT_CLAIM_TYP |
R_JWT_CLAIM_CTY |

## jwa_enc

enum jwa_enc

Enumerator
R_JWA_ENC_UNKNOWN |
R_JWA_ENC_A128CBC |
R_JWA_ENC_A192CBC |
R_JWA_ENC_A256CBC |
R_JWA_ENC_A128GCM |
R_JWA_ENC_A192GCM |
R_JWA_ENC_A256GCM |

## rhn_opt

enum rhn_opt

Enumerator
RHN_OPT_NONE | End option list, mandatory at the end of the option list.
RHN_OPT_HEADER_INT_VALUE | Header Integer value, following parameters must be const char * name, int i_value.
RHN_OPT_HEADER_RHN_INT_VALUE | Header rhn_int_t value, following parameters must be const char * name, rhn_int_t i_value.
RHN_OPT_HEADER_STR_VALUE | Header String value, following parameters must be const char * name, const char * str_value.
RHN_OPT_HEADER_JSON_T_VALUE | Header JSON value, following parameters must be const char * name, json_t * j_value.
RHN_OPT_HEADER_FULL_JSON_T | JSON value to set the entire header, following parameter must be json_t * j_value.
RHN_OPT_HEADER_FULL_JSON_STR | Stringified JSON value to set the entire header, following parameter must be const char * str_value.
RHN_OPT_UN_HEADER_FULL_JSON_T | JSON value to set the entire unprotected header, following parameter must be json_t * j_value.
RHN_OPT_UN_HEADER_FULL_JSON_STR | Stringified JSON value to set the entire unprotected header, following parameter must be const char * str_value.
RHN_OPT_PAYLOAD | JSON value to set the entire payload, following parameters must be const unsigned char * value, size_t value_length.
RHN_OPT_CLAIM_INT_VALUE | Claims Integer value, following parameters must be const char * name, int i_value.
RHN_OPT_CLAIM_RHN_INT_VALUE | Claims Integer value, following parameters must be const char * name, int i_value.
RHN_OPT_CLAIM_STR_VALUE | Claims String value, following parameters must be const char * name, const char * str_value.
RHN_OPT_CLAIM_JSON_T_VALUE | Claims JSON value, following parameters must be const char * name, json_t * j_value.
RHN_OPT_CLAIM_FULL_JSON_T | JSON value to set the entire claims, following parameter must be json_t * j_value.
RHN_OPT_CLAIM_FULL_JSON_STR | Stringified JSON value to set the entire claims, following parameter must be const char * str_value.
RHN_OPT_ENC_ALG | Key management algorithm, following parameter must be a jwa_alg value.
RHN_OPT_ENC | Encryption algorithm, following parameter must be a jwa_enc value.
RHN_OPT_SIG_ALG | Signature algorithm, following parameter must be a jwa_alg value.
RHN_OPT_CIPHER_KEY | Cipher key to encrypt data, following parameters must be const unsigned char * value, size_t value_length.
RHN_OPT_IV | Initial Value (IV) for data encryption, following parameters must be const unsigned char * value, size_t value_length.
RHN_OPT_AAD | Additional Authenticated Data (AAD) for data encryption, following parameters must be const unsigned char * value, size_t value_length.
RHN_OPT_SIGN_KEY_JWK | Private key in JWK format to sign the token, following parameter must be a jwk_t * value.
RHN_OPT_SIGN_KEY_JWKS | Private key set in JWKS format to sign the token, following parameter must be a jwks_t * value.
RHN_OPT_SIGN_KEY_GNUTLS | Private key in GnuTLS format to sign the token, following parameter must be a gnutls_privkey_t value.
RHN_OPT_SIGN_KEY_JSON_T | Private key in JSON format to sign the token, following parameter must be a json_t * value.
RHN_OPT_SIGN_KEY_JSON_STR | Private key in stringified JSON format to sign the token, following parameter must be a const char * value.
RHN_OPT_SIGN_KEY_PEM_DER | Private key in PEM or DER format to sign the token, following parameter must be R_FORMAT_PEM or R_FORMAT_DER, const unsigned char * value, size_t value_length.
RHN_OPT_VERIFY_KEY_JWK | Public key in JWK format to verify the token signature, following parameter must be a jwk_t * value.
RHN_OPT_VERIFY_KEY_JWKS | Public key set in JWKS format to verify the token signature, following parameter must be a jwks_t * value.
RHN_OPT_VERIFY_KEY_GNUTLS | Public key in GnuTLS format to verify the token signature, following parameter must be a gnutls_pubkey_t value.
RHN_OPT_VERIFY_KEY_JSON_T | Public key in JSON format to verify the token signature, following parameter must be a json_t * value.
RHN_OPT_VERIFY_KEY_JSON_STR | Public key in stringified JSON format to verify the token signature, following parameter must be a const char * value.
RHN_OPT_VERIFY_KEY_PEM_DER | Public key in PEM or DER format to verify the token signature, following parameter must be R_FORMAT_PEM or R_FORMAT_DER, const unsigned char * value, size_t value_length.
RHN_OPT_ENCRYPT_KEY_JWK | Public key in JWK format to encrypt the token, following parameter must be a jwk_t * value.
RHN_OPT_ENCRYPT_KEY_JWKS | Public key set in JWKS format to encrypt the token, following parameter must be a jwks_t * value.
RHN_OPT_ENCRYPT_KEY_GNUTLS | Public key in GnuTLS format to encrypt the token, following parameter must be a gnutls_pubkey_t value.
RHN_OPT_ENCRYPT_KEY_JSON_T | Public key in JSON format to encrypt the token, following parameter must be a json_t * value.
RHN_OPT_ENCRYPT_KEY_JSON_STR | Public key in stringified JSON format to encrypt the token, following parameter must be a const char * value.
RHN_OPT_ENCRYPT_KEY_PEM_DER | Public key in PEM or DER format to encrypt the token, following parameter must be R_FORMAT_PEM or R_FORMAT_DER, const unsigned char * value, size_t value_length.
RHN_OPT_DECRYPT_KEY_JWK | Private key in JWK format to decrypt the token, following parameter must be a jwk_t * value.
RHN_OPT_DECRYPT_KEY_JWKS | Private key set in JWKS format to decrypt the token, following parameter must be a jwks_t * value.
RHN_OPT_DECRYPT_KEY_GNUTLS | Private key in GnuTLS format to decrypt the token, following parameter must be a gnutls_privkey_t value.
RHN_OPT_DECRYPT_KEY_JSON_T | Private key in JSON format to decrypt the token, following parameter must be a json_t * value.
RHN_OPT_DECRYPT_KEY_JSON_STR | Private key in stringified JSON format to decrypt the token, following parameter must be a const char * value.
RHN_OPT_DECRYPT_KEY_PEM_DER | Private key in PEM or DER format to decrypt the token, following parameter must be R_FORMAT_PEM or R_FORMAT_DER, const unsigned char * value, size_t value_length.

## rhn_import

enum rhn_import

Enumerator
R_IMPORT_NONE | End option list, mandatory at the end of the option list when using r_jwks_quick_import.
R_IMPORT_JSON_STR | Import from a stringified JSON, following parameter must be a const char * value.
R_IMPORT_JSON_T | Import from a json_t *, following parameter must be a const json_t * value.
R_IMPORT_PEM | Import from a X509 key in PEM format, following parameters must be type (R_X509_TYPE_PUBKEY, R_X509_TYPE_PRIVKEY or R_X509_TYPE_CERTIFICATE), const unsigned char *, size_t.
R_IMPORT_DER | Import from a X509 key in DER format, following parameters must be type (R_X509_TYPE_PUBKEY, R_X509_TYPE_PRIVKEY or R_X509_TYPE_CERTIFICATE), const unsigned char *, size_t.
R_IMPORT_G_PRIVKEY | Import from a gnutls_privkey_t, following parameters must be gnutls_privkey_t.
R_IMPORT_G_PUBKEY | Import from a gnutls_pubkey_t, following parameters must be gnutls_pubkey_t.
R_IMPORT_G_CERT | Import from a gnutls_x509_crt_t, following parameters must be gnutls_x509_crt_t.
R_IMPORT_X5U | Import from an URL pointing to a x5u, following parameters must be x5u_flags (R_FLAG_IGNORE_SERVER_CERTIFICATE, R_FLAG_FOLLOW_REDIRECT, R_FLAG_IGNORE_REMOTE), const char * value.
R_IMPORT_SYMKEY | Import from a symmetric key, following parameters must be const unsigned char *, size_t.
R_IMPORT_PASSWORD | Import from a password, following parameter must be a const char * value.
R_IMPORT_JKU | Import from an URL pointing to a jku, available for r_jwks_quick_import only, following parameters must be x5u_flags (R_FLAG_IGNORE_SERVER_CERTIFICATE, R_FLAG_FOLLOW_REDIRECT, R_FLAG_IGNORE_REMOTE), const char * value.