update main-with-bazel from master branch

This commit is contained in:
BoringSSL Robot
2024-03-12 20:22:05 +00:00
9 changed files with 18 additions and 17 deletions
+1 -1
View File
@@ -422,7 +422,7 @@ int x509_print_rsa_pss_params(BIO *bp, const X509_ALGOR *sigalg, int indent,
// Signature algorithm functions.
// x509_digest_sign_algorithm encodes the signing parameters of |ctx| as an
// AlgorithmIdentifer and saves the result in |algor|. It returns one on
// AlgorithmIdentifier and saves the result in |algor|. It returns one on
// success, or zero on error.
int x509_digest_sign_algorithm(EVP_MD_CTX *ctx, X509_ALGOR *algor);
+7 -6
View File
@@ -1789,7 +1789,8 @@ static bool AddSubjectKeyIdentifier(X509 *x509,
/*crit=*/0, /*flags=*/0);
}
static bool AddAuthorityKeyIdentifer(X509 *x509, bssl::Span<const uint8_t> key_id) {
static bool AddAuthorityKeyIdentifier(X509 *x509,
bssl::Span<const uint8_t> key_id) {
bssl::UniquePtr<AUTHORITY_KEYID> akid(AUTHORITY_KEYID_new());
if (akid == nullptr) {
return false;
@@ -1843,7 +1844,7 @@ static bool AddRevokedSerialU64(X509_CRL *crl, uint64_t serial,
return true;
}
static bool AddAuthorityKeyIdentifer(X509_CRL *crl,
static bool AddAuthorityKeyIdentifier(X509_CRL *crl,
bssl::Span<const uint8_t> key_id) {
bssl::UniquePtr<AUTHORITY_KEYID> akid(AUTHORITY_KEYID_new());
if (akid == nullptr) {
@@ -8429,11 +8430,11 @@ TEST(X509Test, DuplicateName) {
bssl::UniquePtr<X509> leaf1 =
MakeTestCert("CA", "Leaf", key1.get(), /*is_ca=*/false);
ASSERT_TRUE(leaf1);
ASSERT_TRUE(AddAuthorityKeyIdentifer(leaf1.get(), key_id1));
ASSERT_TRUE(AddAuthorityKeyIdentifier(leaf1.get(), key_id1));
ASSERT_TRUE(X509_sign(leaf1.get(), key1.get(), EVP_sha256()));
bssl::UniquePtr<X509_CRL> crl1 = MakeTestCRL("CA", -1, 1);
ASSERT_TRUE(crl1);
ASSERT_TRUE(AddAuthorityKeyIdentifer(crl1.get(), key_id1));
ASSERT_TRUE(AddAuthorityKeyIdentifier(crl1.get(), key_id1));
ASSERT_TRUE(X509_CRL_sign(crl1.get(), key1.get(), EVP_sha256()));
// TODO(davidben): Some state in CRLs does not get correctly set up unless it
// is parsed from data. |X509_CRL_sign| should reset it internally.
@@ -8451,11 +8452,11 @@ TEST(X509Test, DuplicateName) {
bssl::UniquePtr<X509> leaf2 =
MakeTestCert("CA", "Leaf", key2.get(), /*is_ca=*/false);
ASSERT_TRUE(leaf2);
ASSERT_TRUE(AddAuthorityKeyIdentifer(leaf2.get(), key_id2));
ASSERT_TRUE(AddAuthorityKeyIdentifier(leaf2.get(), key_id2));
ASSERT_TRUE(X509_sign(leaf2.get(), key2.get(), EVP_sha256()));
bssl::UniquePtr<X509_CRL> crl2 = MakeTestCRL("CA", -2, 2);
ASSERT_TRUE(crl2);
ASSERT_TRUE(AddAuthorityKeyIdentifer(crl2.get(), key_id2));
ASSERT_TRUE(AddAuthorityKeyIdentifier(crl2.get(), key_id2));
ASSERT_TRUE(X509_CRL_sign(crl2.get(), key2.get(), EVP_sha256()));
// TODO(davidben): Some state in CRLs does not get correctly set up unless it
// is parsed from data. |X509_CRL_sign| should reset it internally.
+1 -1
View File
@@ -3987,7 +3987,7 @@ OPENSSL_EXPORT void SSL_get0_ech_retry_configs(
// to the size of the buffer. The caller must call |OPENSSL_free| on |*out| to
// release the memory. On failure, it returns zero.
//
// The |config_id| field is a single byte identifer for the ECHConfig. Reusing
// The |config_id| field is a single byte identifier for the ECHConfig. Reusing
// config IDs is allowed, but if multiple ECHConfigs with the same config ID are
// active at a time, server load may increase. See
// |SSL_ECH_KEYS_has_duplicate_config_id|.
+3 -3
View File
@@ -254,9 +254,9 @@ OPENSSL_EXPORT void X509_get0_uids(const X509 *x509,
// should not be accepted.
#define EXFLAG_CRITICAL 0x200
// EXFLAG_SS indicates the certificate is likely self-signed. That is, if it is
// self-issued, its authority key identifer (if any) matches itself, and its key
// usage extension (if any) allows certificate signatures. The signature itself
// is not checked in computing this bit.
// self-issued, its authority key identifier (if any) matches itself, and its
// key usage extension (if any) allows certificate signatures. The signature
// itself is not checked in computing this bit.
#define EXFLAG_SS 0x2000
// X509_get_extension_flags decodes a set of extensions from |x509| and returns
+1 -1
View File
@@ -71,7 +71,7 @@ enum class SignatureAlgorithm {
[[nodiscard]] bool ParseHashAlgorithm(der::Input input, DigestAlgorithm *out);
// Parses an AlgorithmIdentifier into a signature algorithm and returns it, or
// returns `std::nullopt` if `algorithm_identifer` either cannot be parsed or
// returns `std::nullopt` if `algorithm_identifier` either cannot be parsed or
// is not a recognized signature algorithm.
OPENSSL_EXPORT std::optional<SignatureAlgorithm> ParseSignatureAlgorithm(
der::Input algorithm_identifier);
+2 -2
View File
@@ -1180,10 +1180,10 @@ type ProtocolBugs struct {
// RSA_EXPORT) in the plain RSA key exchange.
RSAEphemeralKey bool
// SRTPMasterKeyIdentifer, if not empty, is the SRTP MKI value that the
// SRTPMasterKeyIdentifier, if not empty, is the SRTP MKI value that the
// client offers when negotiating SRTP. MKI support is still missing so
// the peer must still send none.
SRTPMasterKeyIdentifer string
SRTPMasterKeyIdentifier string
// SendSRTPProtectionProfile, if non-zero, is the SRTP profile that the
// server sends in the ServerHello instead of the negotiated one.
+1 -1
View File
@@ -521,7 +521,7 @@ func (hs *clientHandshakeState) createClientHello(innerHello *clientHelloMsg, ec
channelIDSupported: c.config.ChannelID != nil,
extendedMasterSecret: maxVersion >= VersionTLS10,
srtpProtectionProfiles: c.config.SRTPProtectionProfiles,
srtpMasterKeyIdentifier: c.config.Bugs.SRTPMasterKeyIdentifer,
srtpMasterKeyIdentifier: c.config.Bugs.SRTPMasterKeyIdentifier,
customExtension: c.config.Bugs.CustomExtension,
omitExtensions: c.config.Bugs.OmitExtensions,
emptyExtensions: c.config.Bugs.EmptyExtensions,
+1 -1
View File
@@ -8331,7 +8331,7 @@ func addExtensionTests() {
MaxVersion: ver.version,
SRTPProtectionProfiles: []uint16{SRTP_AES128_CM_HMAC_SHA1_80},
Bugs: ProtocolBugs{
SRTPMasterKeyIdentifer: "bogus",
SRTPMasterKeyIdentifier: "bogus",
},
},
flags: []string{
+1 -1
View File
@@ -35,7 +35,7 @@ import (
// inputFile represents a textual assembly file.
type inputFile struct {
path string
// index is a unique identifer given to this file. It's used for
// index is a unique identifier given to this file. It's used for
// mapping local symbols.
index int
// isArchive indicates that the input should be processed as an ar