提交 0b759159 编写于 作者: H HJ

huangjun42@huawei.com

Signed-off-by: NHJ <huangjun42@huawei.com>
上级 9124054d

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
文件模式从 100755 更改为 100644
......@@ -13,6 +13,8 @@ Ben Kaduk
Bernd Edlinger
Bodo Möller
David Benjamin
David von Oheimb
Dmitry Belyavskiy (Дмитрий Белявский)
Emilia Käsper
Eric Young
Geoff Thorpe
......@@ -22,14 +24,19 @@ Lutz Jänicke
Mark J. Cox
Matt Caswell
Matthias St. Pierre
Nicola Tuveri
Nils Larsch
Patrick Steuer
Paul Dale
Paul C. Sutton
Paul Yang
Ralf S. Engelschall
Rich Salz
Richard Levitte
Shane Lontis
Stephen Henson
Steve Marquess
Tim Hudson
Tomáš Mráz
Ulf Möller
Viktor Dukhovni
......@@ -4,7 +4,6 @@ import("//build/ohos.gni")
# Only use this to set/unset some cflags, use "platform" variable in gn template to add
# source code for Windows.
use_mingw_win = "${current_os}_${current_cpu}" == "mingw_x86_64"
config("crypto_config") {
include_dirs = [
......@@ -37,7 +36,7 @@ config("crypto_config") {
"-DOPENSSL_NO_RIPEMD",
"-DOPENSSL_NO_RMD160",
]
if (target_cpu == "arm" && !use_mingw_win && host_os != "mac") {
if (current_cpu == "arm" && !(current_os == "linux" || host_os == "mac")) {
cflags += [
"-DOPENSSL_CPUID_OBJ",
"-DOPENSSL_BN_ASM_MONT",
......@@ -52,7 +51,8 @@ config("crypto_config") {
"-DECP_NISTZ256_ASM",
"-DPOLY1305_ASM",
]
} else if (target_cpu == "arm64" && !use_mingw_win && host_os != "mac") {
} else if (current_cpu == "arm64" &&
!(current_os == "linux" || host_os == "mac")) {
cflags += [
"-DOPENSSL_CPUID_OBJ",
"-DOPENSSL_BN_ASM_MONT",
......@@ -64,7 +64,7 @@ config("crypto_config") {
"-DECP_NISTZ256_ASM",
"-DPOLY1305_ASM",
]
} else if (use_mingw_win) {
} else if (is_mingw) {
cflags -= [
"-fPIC",
"-DOPENSSL_NO_BF",
......@@ -89,8 +89,7 @@ config("crypto_config") {
"-Wno-sign-compare",
"-Wno-incompatible-pointer-types",
]
defines = [ "WINDOWS_PLATFORM" ]
} else if (host_os == "mac") {
} else if (current_os == "linux" || host_os == "mac") {
cflags -= [
"-DOPENSSL_NO_BF",
"-DOPENSSL_NO_CAMELLIA",
......@@ -99,6 +98,9 @@ config("crypto_config") {
"-DOPENSSL_NO_RC2",
"-DOPENSSL_NO_RMD160",
]
if (current_os == "linux") {
cflags += [ "-m64" ]
}
cflags += [
"-DL_ENDIAN",
"-D_REENTRAN",
......@@ -106,7 +108,6 @@ config("crypto_config") {
"-MF",
"-c",
]
defines = [ "MAC_PLATFORM" ]
} else {
cflags += [ "-DOPENSSL_NO_ASM" ]
}
......@@ -115,8 +116,15 @@ config("crypto_config") {
config("crypto_config_public") {
include_dirs = [ "./include" ]
if (target_cpu == "arm") {
cflags = [ "-DCPU_ARM32" ]
if (current_cpu == "arm" && !(current_os == "linux" || host_os == "mac")) {
cflags = [ "-DOPENSSL_ARM_PLATFORM" ]
} else if (current_cpu == "arm64" &&
!(current_os == "linux" || host_os == "mac")) {
cflags = [ "-DOPENSSL_ARM64_PLATFORM" ]
} else if (is_mingw) {
cflags = [ "-DWINDOWS_PLATFORM" ]
} else if (current_os == "linux" || host_os == "mac") {
cflags = [ "-DMAC_PLATFORM" ]
}
}
......@@ -723,7 +731,7 @@ ohos_source_set("crypto_source") {
"crypto/x509v3/v3err.c",
]
if (target_cpu == "arm" && !use_mingw_win && host_os != "mac") {
if (current_cpu == "arm" && !(current_os == "linux" || host_os == "mac")) {
sources += [
"crypto/aes/asm/arm32/aes-armv4.S",
"crypto/aes/asm/arm32/aesv8-armx.S",
......@@ -743,7 +751,8 @@ ohos_source_set("crypto_source") {
"crypto/sha/sha256-armv4.S",
"crypto/sha/sha512-armv4.S",
]
} else if (target_cpu == "arm64" && !use_mingw_win && host_os != "mac") {
} else if (current_cpu == "arm64" &&
!(current_os == "linux" || host_os == "mac")) {
sources += [
"crypto/aes/aes_core.c",
"crypto/aes/asm/arm64/aesv8-armx.S",
......@@ -761,7 +770,7 @@ ohos_source_set("crypto_source") {
"crypto/sha/sha256-armv8.S",
"crypto/sha/sha512-armv8.S",
]
} else if (use_mingw_win || host_os == "mac") {
} else if (is_mingw || (current_os == "linux" || host_os == "mac")) {
sources += [
"crypto/aes/aes_core.c",
"crypto/bf/bf_cfb64.c",
......@@ -802,7 +811,7 @@ ohos_source_set("crypto_source") {
"crypto/ripemd/rmd_one.c",
"crypto/sha/keccak1600.c",
]
if (use_mingw_win) {
if (is_mingw) {
sources -= [
"crypto/idea/i_cbc.c",
"crypto/idea/i_cfb64.c",
......@@ -822,10 +831,9 @@ ohos_source_set("crypto_source") {
]
}
configs = [
":crypto_config",
":crypto_config_public",
]
configs = [ ":crypto_config" ]
public_configs = [ ":crypto_config_public" ]
remove_configs = [ "//build/config/coverage:default_coverage" ]
}
......@@ -868,7 +876,11 @@ config("ssl_config") {
"-DOPENSSL_NO_SSL3_METHOD",
]
if (use_mingw_win) {
if (current_cpu == "arm" && host_os != "mac") {
cflags += [ "-DOPENSSL_ARM_PLATFORM" ]
} else if (current_cpu == "arm64" && host_os != "mac") {
cflags += [ "-DOPENSSL_ARM64_PLATFORM" ]
} else if (is_mingw) {
cflags -= [ "-fPIC" ]
cflags += [
"-m64",
......@@ -947,6 +959,7 @@ ohos_source_set("ssl_source") {
"ssl/tls_srp.c",
]
configs = [ ":ssl_config" ]
public_configs = [ ":ssl_config" ]
remove_configs = [ "//build/config/coverage:default_coverage" ]
}
......@@ -7,6 +7,171 @@
https://github.com/openssl/openssl/commits/ and pick the appropriate
release branch.
Changes between 1.1.1j and 1.1.1k [25 Mar 2021]
*) Fixed a problem with verifying a certificate chain when using the
X509_V_FLAG_X509_STRICT flag. This flag enables additional security checks
of the certificates present in a certificate chain. It is not set by
default.
Starting from OpenSSL version 1.1.1h a check to disallow certificates in
the chain that have explicitly encoded elliptic curve parameters was added
as an additional strict check.
An error in the implementation of this check meant that the result of a
previous check to confirm that certificates in the chain are valid CA
certificates was overwritten. This effectively bypasses the check
that non-CA certificates must not be able to issue other certificates.
If a "purpose" has been configured then there is a subsequent opportunity
for checks that the certificate is a valid CA. All of the named "purpose"
values implemented in libcrypto perform this check. Therefore, where
a purpose is set the certificate chain will still be rejected even when the
strict flag has been used. A purpose is set by default in libssl client and
server certificate verification routines, but it can be overridden or
removed by an application.
In order to be affected, an application must explicitly set the
X509_V_FLAG_X509_STRICT verification flag and either not set a purpose
for the certificate verification or, in the case of TLS client or server
applications, override the default purpose.
(CVE-2021-3450)
[Tomáš Mráz]
*) Fixed an issue where an OpenSSL TLS server may crash if sent a maliciously
crafted renegotiation ClientHello message from a client. If a TLSv1.2
renegotiation ClientHello omits the signature_algorithms extension (where
it was present in the initial ClientHello), but includes a
signature_algorithms_cert extension then a NULL pointer dereference will
result, leading to a crash and a denial of service attack.
A server is only vulnerable if it has TLSv1.2 and renegotiation enabled
(which is the default configuration). OpenSSL TLS clients are not impacted
by this issue.
(CVE-2021-3449)
[Peter Kästle and Samuel Sapalski]
Changes between 1.1.1i and 1.1.1j [16 Feb 2021]
*) Fixed the X509_issuer_and_serial_hash() function. It attempts to
create a unique hash value based on the issuer and serial number data
contained within an X509 certificate. However it was failing to correctly
handle any errors that may occur while parsing the issuer field (which might
occur if the issuer field is maliciously constructed). This may subsequently
result in a NULL pointer deref and a crash leading to a potential denial of
service attack.
(CVE-2021-23841)
[Matt Caswell]
*) Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING
padding mode to correctly check for rollback attacks. This is considered a
bug in OpenSSL 1.1.1 because it does not support SSLv2. In 1.0.2 this is
CVE-2021-23839.
[Matt Caswell]
*) Fixed the EVP_CipherUpdate, EVP_EncryptUpdate and EVP_DecryptUpdate
functions. Previously they could overflow the output length argument in some
cases where the input length is close to the maximum permissable length for
an integer on the platform. In such cases the return value from the function
call would be 1 (indicating success), but the output length value would be
negative. This could cause applications to behave incorrectly or crash.
(CVE-2021-23840)
[Matt Caswell]
*) Fixed SRP_Calc_client_key so that it runs in constant time. The previous
implementation called BN_mod_exp without setting BN_FLG_CONSTTIME. This