#include "internal/cryptlib.h"
#include "internal/packet.h"
-#include <openssl/sslerr.h>
+#include <openssl/err.h>
#define DEFAULT_BUF_SIZE 256
pkt->written = 0;
if ((pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs))) == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
return 0;
}
return 0;
if ((sub = OPENSSL_zalloc(sizeof(*sub))) == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
return 0;
}
#include <openssl/rsa.h>
#include <openssl/rand.h>
/* Just for the SSL_MAX_MASTER_KEY_LENGTH value */
-#include <openssl/ssl.h>
+#include <openssl/prov_ssl.h>
#include "internal/cryptlib.h"
#include "crypto/rsa.h"
#include "rsa_local.h"
# define HEADER_DTLS1_H
# endif
+# include <openssl/prov_ssl.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#include <openssl/opensslconf.h>
-# define DTLS1_VERSION 0xFEFF
-# define DTLS1_2_VERSION 0xFEFD
+/* DTLS*_VERSION constants are defined in prov_ssl.h */
# ifndef OPENSSL_NO_DEPRECATED_3_0
# define DTLS_MIN_VERSION DTLS1_VERSION
# define DTLS_MAX_VERSION DTLS1_2_VERSION
# endif
# define DTLS1_VERSION_MAJOR 0xFE
-# define DTLS1_BAD_VER 0x0100
-
/* Special value for method supporting multiple versions */
# define DTLS_ANY_VERSION 0x1FFFF
--- /dev/null
+/*
+ * Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#ifndef OPENSSL_PROV_SSL_H
+# define OPENSSL_PROV_SSL_H
+# pragma once
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* SSL/TLS related defines useful to providers */
+
+# define SSL_MAX_MASTER_KEY_LENGTH 48
+
+# define SSL3_VERSION 0x0300
+# define TLS1_VERSION 0x0301
+# define TLS1_1_VERSION 0x0302
+# define TLS1_2_VERSION 0x0303
+# define TLS1_3_VERSION 0x0304
+# define DTLS1_VERSION 0xFEFF
+# define DTLS1_2_VERSION 0xFEFD
+# define DTLS1_BAD_VER 0x0100
+
+# ifdef __cplusplus
+}
+# endif
+#endif /* OPENSSL_PROV_SSL_H */
# include <openssl/symhacks.h>
# include <openssl/ct.h>
# include <openssl/sslerr.h>
+# include <openssl/prov_ssl.h>
#ifdef __cplusplus
extern "C" {
# define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES (512/8)
# define SSL_MAX_KEY_ARG_LENGTH 8
-# define SSL_MAX_MASTER_KEY_LENGTH 48
+/* SSL_MAX_MASTER_KEY_LENGTH is defined in prov_ssl.h */
/* The maximum number of encrypt/decrypt pipelines we can support */
# define SSL_MAX_PIPELINES 32
# define SSL3_MD_CLIENT_FINISHED_CONST "\x43\x4C\x4E\x54"
# define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52"
-# define SSL3_VERSION 0x0300
+/* SSL3_VERSION is defined in prov_ssl.h */
# define SSL3_VERSION_MAJOR 0x03
# define SSL3_VERSION_MINOR 0x00
# include <openssl/buffer.h>
# include <openssl/x509.h>
+# include <openssl/prov_ssl.h>
#ifdef __cplusplus
extern "C" {
# define OPENSSL_TLS_SECURITY_LEVEL 1
# endif
-# define TLS1_VERSION 0x0301
-# define TLS1_1_VERSION 0x0302
-# define TLS1_2_VERSION 0x0303
-# define TLS1_3_VERSION 0x0304
+/* TLS*_VERSION constants are defined in prov_ssl.h */
# ifndef OPENSSL_NO_DEPRECATED_3_0
# define TLS_MAX_VERSION TLS1_3_VERSION
# endif
#include <openssl/core_dispatch.h>
#include <openssl/core_names.h>
/* For TLS1_VERSION etc */
-#include <openssl/ssl.h>
+#include <openssl/prov_ssl.h>
#include <openssl/params.h>
#include "internal/nelem.h"
#include "internal/tlsgroups.h"
#include <openssl/err.h>
#include <openssl/proverr.h>
/* Just for SSL_MAX_MASTER_KEY_LENGTH */
-#include <openssl/ssl.h>
+#include <openssl/prov_ssl.h>
#include "internal/constant_time.h"
#include "internal/sizes.h"
#include "crypto/rsa.h"
/* Dispatch functions for AES_CBC_HMAC_SHA ciphers */
-/* Only for SSL3_VERSION and TLS1_VERSION */
-#include <openssl/ssl.h>
+/* For SSL3_VERSION and TLS1_VERSION */
+#include <openssl/prov_ssl.h>
#include <openssl/proverr.h>
#include "cipher_aes_cbc_hmac_sha.h"
#include "prov/implementations.h"
*/
/* For SSL3_VERSION */
-#include <openssl/ssl.h>
+#include <openssl/prov_ssl.h>
#include <openssl/proverr.h>
#include "ciphercommon_local.h"
#include "prov/provider_ctx.h"
#include <assert.h>
/* For SSL3_VERSION, TLS1_VERSION etc */
-#include <openssl/ssl.h>
+#include <openssl/prov_ssl.h>
#include <openssl/rand.h>
#include <openssl/proverr.h>
#include "internal/constant_time.h"