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>
This commit is contained in:
parent
6d9e5a7448
commit
34aa55c05e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user