Changeset View
Changeset View
Standalone View
Standalone View
sys/crypto/openssl/ossl.h
Show All 32 Lines | |||||
/* Compatibility shims. */ | /* Compatibility shims. */ | ||||
#define OPENSSL_cleanse explicit_bzero | #define OPENSSL_cleanse explicit_bzero | ||||
void ossl_cpuid(void); | void ossl_cpuid(void); | ||||
/* Needs to be big enough to hold any hash context. */ | /* Needs to be big enough to hold any hash context. */ | ||||
struct ossl_hash_context { | struct ossl_hash_context { | ||||
uint32_t dummy[54]; | uint32_t dummy[61]; | ||||
cem: this feels brittle, although it's not a regression in this diff | |||||
Done Inline Actions
There are static assertions in each of the auth hash files that the context is big enough. The alternative of trying to include the relevant headers is a bit messy. jhb: > this feels brittle, although it's not a regression in this diff
There are static assertions… | |||||
Not Done Inline ActionsYeah, that's reasonable. Is uint32 aligned enough for all algorithms and architectures? cem: Yeah, that's reasonable. Is uint32 aligned enough for all algorithms and architectures? | |||||
Done Inline Actions
It's actually 32 byte alignment for AVX and is sufficient for everything currently. jhb: > Yeah, that's reasonable. Is uint32 aligned enough for all algorithms and architectures? | |||||
} __aligned(32); | } __aligned(32); | ||||
extern struct auth_hash ossl_hash_poly1305; | |||||
extern struct auth_hash ossl_hash_sha1; | extern struct auth_hash ossl_hash_sha1; | ||||
extern struct auth_hash ossl_hash_sha224; | extern struct auth_hash ossl_hash_sha224; | ||||
extern struct auth_hash ossl_hash_sha256; | extern struct auth_hash ossl_hash_sha256; | ||||
extern struct auth_hash ossl_hash_sha384; | extern struct auth_hash ossl_hash_sha384; | ||||
extern struct auth_hash ossl_hash_sha512; | extern struct auth_hash ossl_hash_sha512; | ||||
#endif /* !__OSSL_H__ */ | #endif /* !__OSSL_H__ */ |
this feels brittle, although it's not a regression in this diff