update master-with-bazel from master branch

This commit is contained in:
BoringSSL Robot
2024-09-05 17:55:58 +00:00
13 changed files with 39 additions and 42 deletions
+1 -1
View File
@@ -61,7 +61,6 @@ fips_fragments = [
"src/crypto/fipsmodule/ecdsa/ecdsa.c.inc",
"src/crypto/fipsmodule/hkdf/hkdf.c.inc",
"src/crypto/fipsmodule/hmac/hmac.c.inc",
"src/crypto/fipsmodule/md4/md4.c.inc",
"src/crypto/fipsmodule/md5/md5.c.inc",
"src/crypto/fipsmodule/modes/cbc.c.inc",
"src/crypto/fipsmodule/modes/cfb.c.inc",
@@ -409,6 +408,7 @@ crypto_sources = [
"src/crypto/keccak/keccak.c",
"src/crypto/kyber/kyber.c",
"src/crypto/lhash/lhash.c",
"src/crypto/md4/md4.c",
"src/crypto/mem.c",
"src/crypto/mldsa/mldsa.c",
"src/crypto/mlkem/mlkem.cc",
+1
View File
@@ -375,6 +375,7 @@ add_library(
src/crypto/keccak/keccak.c
src/crypto/kyber/kyber.c
src/crypto/lhash/lhash.c
src/crypto/md4/md4.c
src/crypto/mem.c
src/crypto/mldsa/mldsa.c
src/crypto/mlkem/mlkem.cc
+1 -1
View File
@@ -118,6 +118,7 @@
"src/crypto/keccak/keccak.c",
"src/crypto/kyber/kyber.c",
"src/crypto/lhash/lhash.c",
"src/crypto/md4/md4.c",
"src/crypto/mem.c",
"src/crypto/mldsa/mldsa.c",
"src/crypto/mlkem/mlkem.cc",
@@ -951,7 +952,6 @@
"src/crypto/fipsmodule/ecdsa/ecdsa.c.inc",
"src/crypto/fipsmodule/hkdf/hkdf.c.inc",
"src/crypto/fipsmodule/hmac/hmac.c.inc",
"src/crypto/fipsmodule/md4/md4.c.inc",
"src/crypto/fipsmodule/md5/md5.c.inc",
"src/crypto/fipsmodule/modes/cbc.c.inc",
"src/crypto/fipsmodule/modes/cfb.c.inc",
+1 -1
View File
@@ -68,7 +68,6 @@
"crypto/fipsmodule/ecdsa/ecdsa.c.inc",
"crypto/fipsmodule/hkdf/hkdf.c.inc",
"crypto/fipsmodule/hmac/hmac.c.inc",
"crypto/fipsmodule/md4/md4.c.inc",
"crypto/fipsmodule/md5/md5.c.inc",
"crypto/fipsmodule/modes/cbc.c.inc",
"crypto/fipsmodule/modes/cfb.c.inc",
@@ -267,6 +266,7 @@
"crypto/keccak/keccak.c",
"crypto/kyber/kyber.c",
"crypto/lhash/lhash.c",
"crypto/md4/md4.c",
"crypto/mem.c",
"crypto/mldsa/mldsa.c",
"crypto/mlkem/mlkem.cc",
+27
View File
@@ -61,6 +61,7 @@
#include <openssl/blake2.h>
#include <openssl/bytestring.h>
#include <openssl/obj.h>
#include <openssl/md4.h>
#include <openssl/nid.h>
#include "../asn1/internal.h"
@@ -264,3 +265,29 @@ static const EVP_MD evp_md_blake2b256 = {
};
const EVP_MD *EVP_blake2b256(void) { return &evp_md_blake2b256; }
static void md4_init(EVP_MD_CTX *ctx) {
BSSL_CHECK(MD4_Init(ctx->md_data));
}
static void md4_update(EVP_MD_CTX *ctx, const void *data, size_t count) {
BSSL_CHECK(MD4_Update(ctx->md_data, data, count));
}
static void md4_final(EVP_MD_CTX *ctx, uint8_t *out) {
BSSL_CHECK(MD4_Final(out, ctx->md_data));
}
static const EVP_MD evp_md_md4 = {
NID_md4,
MD4_DIGEST_LENGTH,
0,
md4_init,
md4_update,
md4_final,
64,
sizeof(MD4_CTX),
};
const EVP_MD *EVP_md4(void) { return &evp_md_md4; }
-1
View File
@@ -85,7 +85,6 @@
#include "ec/wnaf.c.inc"
#include "hkdf/hkdf.c.inc"
#include "hmac/hmac.c.inc"
#include "md4/md4.c.inc"
#include "md5/md5.c.inc"
#include "modes/cbc.c.inc"
#include "modes/cfb.c.inc"
@@ -59,7 +59,6 @@
#include <assert.h>
#include <string.h>
#include <openssl/md4.h>
#include <openssl/md5.h>
#include <openssl/nid.h>
#include <openssl/sha.h>
@@ -75,30 +74,6 @@
#endif
static void md4_init(EVP_MD_CTX *ctx) {
CHECK(MD4_Init(ctx->md_data));
}
static void md4_update(EVP_MD_CTX *ctx, const void *data, size_t count) {
CHECK(MD4_Update(ctx->md_data, data, count));
}
static void md4_final(EVP_MD_CTX *ctx, uint8_t *out) {
CHECK(MD4_Final(out, ctx->md_data));
}
DEFINE_METHOD_FUNCTION(EVP_MD, EVP_md4) {
out->type = NID_md4;
out->md_size = MD4_DIGEST_LENGTH;
out->flags = 0;
out->init = md4_init;
out->update = md4_update;
out->final = md4_final;
out->block_size = 64;
out->ctx_size = sizeof(MD4_CTX);
}
static void md5_init(EVP_MD_CTX *ctx) {
CHECK(MD5_Init(ctx->md_data));
}
@@ -1900,6 +1900,8 @@ TEST(ServiceIndicatorTest, SHA) {
std::vector<uint8_t> digest;
// MD4 is no longer of FIPS - this is retained for now to mimic previous
// behavior.
digest.resize(MD4_DIGEST_LENGTH);
MD4_CTX md4_ctx;
ASSERT_TRUE(CALL_SERVICE_AND_CHECK_APPROVED(approved, MD4_Init(&md4_ctx)));
@@ -59,8 +59,8 @@
#include <stdlib.h>
#include <string.h>
#include "../../internal.h"
#include "../digest/md32_common.h"
#include "../internal.h"
#include "../crypto/fipsmodule/digest/md32_common.h"
uint8_t *MD4(const uint8_t *data, size_t len, uint8_t out[MD4_DIGEST_LENGTH]) {
@@ -231,10 +231,3 @@ void md4_block_data_order(uint32_t *state, const uint8_t *data, size_t num) {
D = state[3] += D;
}
}
#undef F
#undef G
#undef H
#undef R0
#undef R1
#undef R2
+1 -1
View File
@@ -71,7 +71,6 @@ bcm_internal_headers = [
"crypto/fipsmodule/ecdsa/ecdsa.c.inc",
"crypto/fipsmodule/hkdf/hkdf.c.inc",
"crypto/fipsmodule/hmac/hmac.c.inc",
"crypto/fipsmodule/md4/md4.c.inc",
"crypto/fipsmodule/md5/md5.c.inc",
"crypto/fipsmodule/modes/cbc.c.inc",
"crypto/fipsmodule/modes/cfb.c.inc",
@@ -366,6 +365,7 @@ crypto_sources = [
"crypto/keccak/keccak.c",
"crypto/kyber/kyber.c",
"crypto/lhash/lhash.c",
"crypto/md4/md4.c",
"crypto/mem.c",
"crypto/mldsa/mldsa.c",
"crypto/mlkem/mlkem.cc",
+1 -1
View File
@@ -75,7 +75,6 @@ set(
crypto/fipsmodule/ecdsa/ecdsa.c.inc
crypto/fipsmodule/hkdf/hkdf.c.inc
crypto/fipsmodule/hmac/hmac.c.inc
crypto/fipsmodule/md4/md4.c.inc
crypto/fipsmodule/md5/md5.c.inc
crypto/fipsmodule/modes/cbc.c.inc
crypto/fipsmodule/modes/cfb.c.inc
@@ -380,6 +379,7 @@ set(
crypto/keccak/keccak.c
crypto/kyber/kyber.c
crypto/lhash/lhash.c
crypto/md4/md4.c
crypto/mem.c
crypto/mldsa/mldsa.c
crypto/mlkem/mlkem.cc
+1 -1
View File
@@ -71,7 +71,6 @@ bcm_internal_headers = [
"crypto/fipsmodule/ecdsa/ecdsa.c.inc",
"crypto/fipsmodule/hkdf/hkdf.c.inc",
"crypto/fipsmodule/hmac/hmac.c.inc",
"crypto/fipsmodule/md4/md4.c.inc",
"crypto/fipsmodule/md5/md5.c.inc",
"crypto/fipsmodule/modes/cbc.c.inc",
"crypto/fipsmodule/modes/cfb.c.inc",
@@ -366,6 +365,7 @@ crypto_sources = [
"crypto/keccak/keccak.c",
"crypto/kyber/kyber.c",
"crypto/lhash/lhash.c",
"crypto/md4/md4.c",
"crypto/mem.c",
"crypto/mldsa/mldsa.c",
"crypto/mlkem/mlkem.cc",
+1 -1
View File
@@ -56,7 +56,6 @@
"crypto/fipsmodule/ecdsa/ecdsa.c.inc",
"crypto/fipsmodule/hkdf/hkdf.c.inc",
"crypto/fipsmodule/hmac/hmac.c.inc",
"crypto/fipsmodule/md4/md4.c.inc",
"crypto/fipsmodule/md5/md5.c.inc",
"crypto/fipsmodule/modes/cbc.c.inc",
"crypto/fipsmodule/modes/cfb.c.inc",
@@ -350,6 +349,7 @@
"crypto/keccak/keccak.c",
"crypto/kyber/kyber.c",
"crypto/lhash/lhash.c",
"crypto/md4/md4.c",
"crypto/mem.c",
"crypto/mldsa/mldsa.c",
"crypto/mlkem/mlkem.cc",