lint fixes discussed in #199
This commit is contained in:
parent
253f3c45e1
commit
87142382da
@ -52,8 +52,7 @@ int gcm_memory( int cipher,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cipher_descriptor[cipher].accel_gcm_memory != NULL) {
|
if (cipher_descriptor[cipher].accel_gcm_memory != NULL) {
|
||||||
return
|
return cipher_descriptor[cipher].accel_gcm_memory
|
||||||
cipher_descriptor[cipher].accel_gcm_memory
|
|
||||||
(key, keylen,
|
(key, keylen,
|
||||||
IV, IVlen,
|
IV, IVlen,
|
||||||
adata, adatalen,
|
adata, adatalen,
|
||||||
|
@ -54,7 +54,7 @@ int ocb3_add_aad(ocb3_state *ocb, const unsigned char *aad, unsigned long aadlen
|
|||||||
datalen = aadlen;
|
datalen = aadlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (datalen <= 0) return CRYPT_OK;
|
if (datalen == 0) return CRYPT_OK;
|
||||||
|
|
||||||
full_blocks = datalen/ocb->block_len;
|
full_blocks = datalen/ocb->block_len;
|
||||||
full_blocks_len = full_blocks * ocb->block_len;
|
full_blocks_len = full_blocks * ocb->block_len;
|
||||||
|
@ -962,7 +962,7 @@ int chacha_test(void);
|
|||||||
#ifdef LTC_RC4_STREAM
|
#ifdef LTC_RC4_STREAM
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int x, y;
|
unsigned int x, y;
|
||||||
unsigned char buf[256];
|
unsigned char buf[256];
|
||||||
} rc4_state;
|
} rc4_state;
|
||||||
|
|
||||||
|
@ -92,7 +92,8 @@ int dsa_decrypt_key(const unsigned char *in, unsigned long inlen,
|
|||||||
goto LBL_ERR;
|
goto LBL_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
y = MIN(mp_unsigned_bin_size(key->p) + 1, MAXBLOCKSIZE);
|
y = mp_unsigned_bin_size(key->p) + 1;
|
||||||
|
y = MIN(y, MAXBLOCKSIZE);
|
||||||
if ((err = hash_memory(hash, expt, x, expt, &y)) != CRYPT_OK) {
|
if ((err = hash_memory(hash, expt, x, expt, &y)) != CRYPT_OK) {
|
||||||
goto LBL_ERR;
|
goto LBL_ERR;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ int dsa_verify_hash(const unsigned char *sig, unsigned long siglen,
|
|||||||
void *r, *s;
|
void *r, *s;
|
||||||
|
|
||||||
if ((err = mp_init_multi(&r, &s, NULL)) != CRYPT_OK) {
|
if ((err = mp_init_multi(&r, &s, NULL)) != CRYPT_OK) {
|
||||||
return CRYPT_MEM;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* decode the sequence */
|
/* decode the sequence */
|
||||||
|
@ -160,7 +160,6 @@ int pkcs_1_oaep_decode(const unsigned char *msg, unsigned long msglen,
|
|||||||
/* copy message */
|
/* copy message */
|
||||||
*outlen = modulus_len - hLen - 1 - x;
|
*outlen = modulus_len - hLen - 1 - x;
|
||||||
XMEMCPY(out, DB + x, modulus_len - hLen - 1 - x);
|
XMEMCPY(out, DB + x, modulus_len - hLen - 1 - x);
|
||||||
x += modulus_len - hLen - 1;
|
|
||||||
|
|
||||||
/* valid packet */
|
/* valid packet */
|
||||||
*res = 1;
|
*res = 1;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
int rsa_import_x509(const unsigned char *in, unsigned long inlen, rsa_key *key)
|
int rsa_import_x509(const unsigned char *in, unsigned long inlen, rsa_key *key)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
unsigned char *tmpbuf=NULL;
|
unsigned char *tmpbuf;
|
||||||
unsigned long tmpbuf_len, tmp_inlen;
|
unsigned long tmpbuf_len, tmp_inlen;
|
||||||
ltc_asn1_list *decoded_list = NULL, *l;
|
ltc_asn1_list *decoded_list = NULL, *l;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user