X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=blobdiff_plain;f=src%2Flibstrongswan%2Fcrypto%2Fsigners%2Fsigner.h;h=4218e41462a0cac0d198f6b77e8448080d375366;hp=585183998031c3b4c005d9d2e006b8f94cfd3324;hb=dc5a849bf0a333012c009f7e7d4c44c5d4988819;hpb=e698dc4559a29ddce45738236ac43d484e80618a diff --git a/src/libstrongswan/crypto/signers/signer.h b/src/libstrongswan/crypto/signers/signer.h index 5851839..4218e41 100644 --- a/src/libstrongswan/crypto/signers/signer.h +++ b/src/libstrongswan/crypto/signers/signer.h @@ -24,18 +24,16 @@ #ifndef SIGNER_H_ #define SIGNER_H_ -#include -#include - typedef enum integrity_algorithm_t integrity_algorithm_t; +typedef struct signer_t signer_t; + +#include /** * @brief Integrity algorithm, as in IKEv2 RFC 3.3.2. - * - * Currently only the following algorithms are implemented and therefore supported: - * - AUTH_HMAC_MD5_96 - * - AUTH_HMAC_SHA1_96 - * + * + * Algorithms not specified in IKEv2 are allocated in private use space. + * * @ingroup signers */ enum integrity_algorithm_t { @@ -46,31 +44,39 @@ enum integrity_algorithm_t { AUTH_HMAC_SHA1_96 = 2, AUTH_DES_MAC = 3, AUTH_KPDK_MD5 = 4, - AUTH_AES_XCBC_96 = 5 + AUTH_AES_XCBC_96 = 5, + /** Implemented via hmac_signer_t */ + AUTH_HMAC_SHA2_256_128 = 12, + /** Implemented via hmac_signer_t */ + AUTH_HMAC_SHA2_384_192 = 13, + /** Implemented via hmac_signer_t */ + AUTH_HMAC_SHA2_512_256 = 14, + /** Implemented via hmac_signer_t */ + AUTH_HMAC_SHA1_128 = 1025, }; -/** - * String mappings for integrity_algorithm_t. +/** + * enum names for integrity_algorithm_t. */ -extern mapping_t integrity_algorithm_m[]; - - -typedef struct signer_t signer_t; +extern enum_name_t *integrity_algorithm_names; /** * @brief Generig interface for a symmetric signature algorithm. - * + * * @b Constructors: * - signer_create() * - hmac_signer_create() - * + * * @todo Implement more integrity algorithms - * + * * @ingroup signers */ struct signer_t { /** * @brief Generate a signature. + * + * If buffer is NULL, data is processed and prepended to a next call until + * buffer is a valid pointer. * * @param this calling object * @param data a chunk containing the data to sign @@ -80,6 +86,9 @@ struct signer_t { /** * @brief Generate a signature and allocate space for it. + * + * If chunk is NULL, data is processed and prepended to a next call until + * chunk is a valid chunk pointer. * * @param this calling object * @param data a chunk containing the data to sign