-# ifdef __FreeBSD__
- memset(&crypto_info, 0, sizeof(crypto_info));
- switch (s->s3.tmp.new_cipher->algorithm_enc) {
- case SSL_AES128GCM:
- case SSL_AES256GCM:
- crypto_info.cipher_algorithm = CRYPTO_AES_NIST_GCM_16;
- crypto_info.iv_len = EVP_GCM_TLS_FIXED_IV_LEN;
- break;
- case SSL_AES128:
- case SSL_AES256:
- if (s->ext.use_etm)
- goto skip_ktls;
- switch (s->s3.tmp.new_cipher->algorithm_mac) {
- case SSL_SHA1:
- crypto_info.auth_algorithm = CRYPTO_SHA1_HMAC;
- break;
- case SSL_SHA256:
- crypto_info.auth_algorithm = CRYPTO_SHA2_256_HMAC;
- break;
- case SSL_SHA384:
- crypto_info.auth_algorithm = CRYPTO_SHA2_384_HMAC;
- break;
- default:
- goto skip_ktls;
- }
- crypto_info.cipher_algorithm = CRYPTO_AES_CBC;
- crypto_info.iv_len = EVP_CIPHER_iv_length(c);
- crypto_info.auth_key = ms;
- crypto_info.auth_key_len = *mac_secret_size;
- break;
- default:
- goto skip_ktls;
- }
- crypto_info.cipher_key = key;
- crypto_info.cipher_key_len = EVP_CIPHER_key_length(c);
- crypto_info.iv = iv;
- crypto_info.tls_vmajor = (s->version >> 8) & 0x000000ff;
- crypto_info.tls_vminor = (s->version & 0x000000ff);
-# else /* !defined(__FreeBSD__) */