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:
David Benjamin 2016-07-16 05:17:31 +02:00 committed by CQ bot account: commit-bot@chromium.org
parent 97d17d94e5
commit edd65fb132
2 changed files with 2 additions and 2 deletions

View File

@ -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,
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) {
/* https://tools.ietf.org/html/rfc5869#section-2.3 */
const size_t digest_len = EVP_MD_size(digest);

View File

@ -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
* 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,
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 info_len);