#include <openssl/ssl.h>
#include <assert.h>
#include <string.h>
#include <utility>
#include <openssl/bn.h>
#include <openssl/bytestring.h>
#include <openssl/curve25519.h>
#include <openssl/ec.h>
#include <openssl/err.h>
#define OPENSSL_UNSTABLE_EXPERIMENTAL_KYBER
#include <openssl/experimental/kyber.h>
#include <openssl/hrss.h>
#include <openssl/mem.h>
#include <openssl/mlkem.h>
#include <openssl/nid.h>
#include <openssl/rand.h>
#include <openssl/span.h>
#include "internal.h"
#include "../crypto/internal.h"
BSSL_NAMESPACE_BEGIN
namespace {
class ECKeyShare : public SSLKeyShare { … };
class X25519KeyShare : public SSLKeyShare { … };
class X25519Kyber768KeyShare : public SSLKeyShare { … };
class X25519MLKEM768KeyShare : public SSLKeyShare { … };
constexpr NamedGroup kNamedGroups[] = …;
}
Span<const NamedGroup> NamedGroups() { … }
UniquePtr<SSLKeyShare> SSLKeyShare::Create(uint16_t group_id) { … }
bool ssl_nid_to_group_id(uint16_t *out_group_id, int nid) { … }
bool ssl_name_to_group_id(uint16_t *out_group_id, const char *name, size_t len) { … }
int ssl_group_id_to_nid(uint16_t group_id) { … }
BSSL_NAMESPACE_END
usingnamespacebssl;
const char* SSL_get_group_name(uint16_t group_id) { … }
size_t SSL_get_all_group_names(const char **out, size_t max_out) { … }