Skip to content

Commit

Permalink
Merge branch 'main' into refactor-return-type-cipher-key-init-destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
jouho authored Jul 10, 2024
2 parents 42e8261 + 9371c90 commit c07b61d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crypto/s2n_aead_cipher_aes_gcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@
#include "utils/s2n_blob.h"
#include "utils/s2n_safety.h"

#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC)
#define S2N_AEAD_AES_GCM_AVAILABLE
#endif

static uint8_t s2n_aead_cipher_aes128_gcm_available()
{
#if defined(S2N_AEAD_AES_GCM_AVAILABLE)
#if defined(S2N_LIBCRYPTO_SUPPORTS_EVP_AEAD_TLS)
return (EVP_aead_aes_128_gcm() ? 1 : 0);
#else
return (EVP_aes_128_gcm() ? 1 : 0);
Expand All @@ -37,14 +33,14 @@ static uint8_t s2n_aead_cipher_aes128_gcm_available()

static uint8_t s2n_aead_cipher_aes256_gcm_available()
{
#if defined(S2N_AEAD_AES_GCM_AVAILABLE)
#if defined(S2N_LIBCRYPTO_SUPPORTS_EVP_AEAD_TLS)
return (EVP_aead_aes_256_gcm() ? 1 : 0);
#else
return (EVP_aes_256_gcm() ? 1 : 0);
#endif
}

#if defined(S2N_AEAD_AES_GCM_AVAILABLE) /* BoringSSL and AWS-LC AEAD API implementation */
#if defined(S2N_LIBCRYPTO_SUPPORTS_EVP_AEAD_TLS) /* BoringSSL and AWS-LC AEAD API implementation */

static int s2n_aead_cipher_aes_gcm_encrypt(struct s2n_session_key *key, struct s2n_blob *iv, struct s2n_blob *aad, struct s2n_blob *in, struct s2n_blob *out)
{
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
# GnuTLS-cli and serv utilities needed for some integration tests.
pkgs.gnutls
pkgs.gdb
pkgs.tshark

# C Compiler Tooling: llvmPkgs.clangUseLLVM -- wrapper to overwrite default compiler with clang
llvmPkgs.llvm
Expand Down

0 comments on commit c07b61d

Please sign in to comment.