#include <openssl/ssl.h>
#include <assert.h>
#include <string.h>
#include <openssl/aead.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include "../crypto/internal.h"
#include "internal.h"
#if defined(BORINGSSL_UNSAFE_FUZZER_MODE)
#define FUZZER_MODE …
#else
#define FUZZER_MODE …
#endif
BSSL_NAMESPACE_BEGIN
SSLAEADContext::SSLAEADContext(uint16_t version_arg, bool is_dtls_arg,
const SSL_CIPHER *cipher_arg)
: … { … }
SSLAEADContext::~SSLAEADContext() { … }
UniquePtr<SSLAEADContext> SSLAEADContext::CreateNullCipher(bool is_dtls) { … }
UniquePtr<SSLAEADContext> SSLAEADContext::Create(
enum evp_aead_direction_t direction, uint16_t version, bool is_dtls,
const SSL_CIPHER *cipher, Span<const uint8_t> enc_key,
Span<const uint8_t> mac_key, Span<const uint8_t> fixed_iv) { … }
UniquePtr<SSLAEADContext> SSLAEADContext::CreatePlaceholderForQUIC(
uint16_t version, const SSL_CIPHER *cipher) { … }
void SSLAEADContext::SetVersionIfNullCipher(uint16_t version) { … }
uint16_t SSLAEADContext::ProtocolVersion() const { … }
uint16_t SSLAEADContext::RecordVersion() const { … }
size_t SSLAEADContext::ExplicitNonceLen() const { … }
bool SSLAEADContext::SuffixLen(size_t *out_suffix_len, const size_t in_len,
const size_t extra_in_len) const { … }
bool SSLAEADContext::CiphertextLen(size_t *out_len, const size_t in_len,
const size_t extra_in_len) const { … }
size_t SSLAEADContext::MaxOverhead() const { … }
Span<const uint8_t> SSLAEADContext::GetAdditionalData(
uint8_t storage[13], uint8_t type, uint16_t record_version, uint64_t seqnum,
size_t plaintext_len, Span<const uint8_t> header) { … }
bool SSLAEADContext::Open(Span<uint8_t> *out, uint8_t type,
uint16_t record_version, uint64_t seqnum,
Span<const uint8_t> header, Span<uint8_t> in) { … }
bool SSLAEADContext::SealScatter(uint8_t *out_prefix, uint8_t *out,
uint8_t *out_suffix, uint8_t type,
uint16_t record_version, uint64_t seqnum,
Span<const uint8_t> header, const uint8_t *in,
size_t in_len, const uint8_t *extra_in,
size_t extra_in_len) { … }
bool SSLAEADContext::Seal(uint8_t *out, size_t *out_len, size_t max_out_len,
uint8_t type, uint16_t record_version,
uint64_t seqnum, Span<const uint8_t> header,
const uint8_t *in, size_t in_len) { … }
bool SSLAEADContext::GetIV(const uint8_t **out_iv, size_t *out_iv_len) const { … }
BSSL_NAMESPACE_END