diff options
author | Adam Langley <agl@google.com> | 2015-12-04 23:06:51 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-12-04 23:23:46 +0300 |
commit | 34aa55c05e85d510c606274396c7236742c86607 (patch) | |
tree | 90cfb13b710ddbf14234dd79b81e3d784adeb995 /include/openssl/sha.h | |
parent | 6d9e5a74482bb832a6b4d9ae3d20d8f10f250bbd (diff) |
Support the SHA_CTX hack without ANDROID.
wpa_supplicant needs access to the internals of SHA_CTX. We supported
this only for builds with ANDROID defined previously but that's a pain
for wpa_supplicant to deal with. Thus this change enables it
unconditionally.
Perhaps in the future we'll be able to get a function to do this into
OpenSSL and BoringSSL.
Change-Id: Ib5d088c586fe69249c87404adb45aab5a7d5cf80
Reviewed-on: https://boringssl-review.googlesource.com/6630
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl/sha.h')
-rw-r--r-- | include/openssl/sha.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/openssl/sha.h b/include/openssl/sha.h index f4253ec4..42875f15 100644 --- a/include/openssl/sha.h +++ b/include/openssl/sha.h @@ -98,11 +98,8 @@ OPENSSL_EXPORT uint8_t *SHA1(const uint8_t *data, size_t len, uint8_t *out); OPENSSL_EXPORT void SHA1_Transform(SHA_CTX *sha, const uint8_t *block); struct sha_state_st { -#if !defined(ANDROID) - uint32_t h[5]; -#else /* wpa_supplicant accesses |h0|..|h4| so we must support those names - * for compatibility with it until it can be updated. */ + * for compatibility. */ union { uint32_t h[5]; struct { @@ -113,7 +110,7 @@ struct sha_state_st { uint32_t h4; }; }; -#endif + uint32_t Nl, Nh; uint32_t data[16]; unsigned int num; |