19 #include <openssl/hmac.h> 20 #include <openssl/rand.h> 21 #include <openssl/evp.h> 37 }) ip4_and_esp_header_t;
42 }) ip6_and_esp_header_t;
79 memset (em, 0,
sizeof (em[0]));
102 i->
md = EVP_sha384();
106 i->
md = EVP_sha512();
112 for (thread_id = 0; thread_id < tm->
n_vlib_mains - 1; thread_id++)
133 const EVP_MD * md =
NULL;
146 HMAC_Init(ctx, key, key_len, md);
148 HMAC_Update(ctx, data, data_len);
151 HMAC_Update(ctx, (
u8 *) &seq_hi,
sizeof(seq_hi));
152 HMAC_Final(ctx, signature, &len);
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
ipsec_crypto_alg_t last_decrypt_alg
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
always_inline vlib_thread_main_t * vlib_get_thread_main()
sll srl srl sll sra u16x4 i
ipsec_integ_alg_t last_integ_alg
esp_crypto_alg_t * esp_crypto_algs
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
esp_integ_alg_t * esp_integ_algs
EVP_CIPHER_CTX encrypt_ctx
uword os_get_cpu_number(void)
ipsec_crypto_alg_t last_encrypt_alg
always_inline void esp_init()
always_inline unsigned int hmac_calc(ipsec_integ_alg_t alg, u8 *key, int key_len, u8 *data, int data_len, u8 *signature, u8 use_esn, u32 seq_hi)
#define CLIB_CACHE_LINE_BYTES
typedef CLIB_PACKED(struct{ip4_header_t ip4;esp_header_t esp;}) ip4_and_esp_header_t
esp_main_per_thread_data_t * per_thread_data
EVP_CIPHER_CTX decrypt_ctx