Differential D22184 Diff 64134 www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_rand_ctrdrbg.c
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_boringssl_src_crypto_fipsmodule_rand_ctrdrbg.c
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/ctrdrbg.c.orig 2019-05-23 12:39:34 UTC | |||||
+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/ctrdrbg.c | |||||
@@ -70,8 +70,12 @@ OPENSSL_STATIC_ASSERT(CTR_DRBG_ENTROPY_LEN % AES_BLOCK | |||||
// ctr_inc adds |n| to the last four bytes of |drbg->counter|, treated as a | |||||
// big-endian number. | |||||
static void ctr32_add(CTR_DRBG_STATE *drbg, uint32_t n) { | |||||
+#ifdef OPENSSL_BIGENDIAN | |||||
+ drbg->counter.words[3] += n; | |||||
+#else | |||||
drbg->counter.words[3] = | |||||
CRYPTO_bswap4(CRYPTO_bswap4(drbg->counter.words[3]) + n); | |||||
+#endif | |||||
} | |||||
static int ctr_drbg_update(CTR_DRBG_STATE *drbg, const uint8_t *data, |