瀏覽代碼

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 年之前
committed by Adam Langley
父節點
當前提交
22bb031c43
共有 1 個檔案被更改,包括 2 行新增3 行删除
  1. +2
    -3
      crypto/aes/aes.c

+ 2
- 3
crypto/aes/aes.c 查看文件

@@ -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…
取消
儲存