Const-correct HKDF_expand.
prk should be a const parameter. Change-Id: I2369ed9f87fc3c59afc07d3b667b86aec340052e Reviewed-on: https://boringssl-review.googlesource.com/8810 Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
97d17d94e5
commit
edd65fb132
@ -55,7 +55,7 @@ int HKDF_extract(uint8_t *out_key, size_t *out_len, const EVP_MD *digest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int HKDF_expand(uint8_t *out_key, size_t out_len, const EVP_MD *digest,
|
int HKDF_expand(uint8_t *out_key, size_t out_len, const EVP_MD *digest,
|
||||||
uint8_t *prk, size_t prk_len, const uint8_t *info,
|
const uint8_t *prk, size_t prk_len, const uint8_t *info,
|
||||||
size_t info_len) {
|
size_t info_len) {
|
||||||
/* https://tools.ietf.org/html/rfc5869#section-2.3 */
|
/* https://tools.ietf.org/html/rfc5869#section-2.3 */
|
||||||
const size_t digest_len = EVP_MD_size(digest);
|
const size_t digest_len = EVP_MD_size(digest);
|
||||||
|
@ -50,7 +50,7 @@ OPENSSL_EXPORT int HKDF_extract(uint8_t *out_key, size_t *out_len,
|
|||||||
* |out_len| from the PRK |prk| and info |info| using |digest|, and outputs
|
* |out_len| from the PRK |prk| and info |info| using |digest|, and outputs
|
||||||
* the result to |out_key|. It returns one on success and zero on error. */
|
* the result to |out_key|. It returns one on success and zero on error. */
|
||||||
OPENSSL_EXPORT int HKDF_expand(uint8_t *out_key, size_t out_len,
|
OPENSSL_EXPORT int HKDF_expand(uint8_t *out_key, size_t out_len,
|
||||||
const EVP_MD *digest, uint8_t *prk,
|
const EVP_MD *digest, const uint8_t *prk,
|
||||||
size_t prk_len, const uint8_t *info,
|
size_t prk_len, const uint8_t *info,
|
||||||
size_t info_len);
|
size_t info_len);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user