Browse Source

Don't mark AES_set_{en|de}crypt_key arg as const.

Windows complains when the declaration of a function doesn't match the
definition. In this case, the |bits| argument (not a pointer, just an
unsigned) was marked as const in the definition only.

Normally const isn't used for non-pointer arguments so I've removed it
in this case to make Windows compile.

https://code.google.com/p/chromium/issues/detail?id=398960

Change-Id: If7386cf61f9dfbf6b32bfada1a49d5742fe94396
Reviewed-on: https://boringssl-review.googlesource.com/1338
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
Adam Langley 10 years ago
committed by Adam Langley
parent
commit
22bb031c43
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      crypto/aes/aes.c

+ 2
- 3
crypto/aes/aes.c View File

@@ -557,7 +557,7 @@ static const uint32_t rcon[] = {
/* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
};

int AES_set_encrypt_key(const uint8_t *key, const unsigned bits, AES_KEY *aeskey) {
int AES_set_encrypt_key(const uint8_t *key, unsigned bits, AES_KEY *aeskey) {
uint32_t *rk;
int i = 0;
uint32_t temp;
@@ -652,8 +652,7 @@ int AES_set_encrypt_key(const uint8_t *key, const unsigned bits, AES_KEY *aeskey
return 0;
}

int AES_set_decrypt_key(const unsigned char *key, const unsigned bits,
AES_KEY *aeskey) {
int AES_set_decrypt_key(const uint8_t *key, unsigned bits, AES_KEY *aeskey) {
uint32_t *rk;
int i, j, status;
uint32_t temp;


Loading…
Cancel
Save