unsigned char buffer[BUF_SIZE];
unsigned char reverted_buffer[BUF_SIZE];
ssize_t bytes;
- int i, j, k;
+
start_hash12(ctx);
while ((bytes = read(fd, buffer, BUF_SIZE)) > 0) {
hash12_block(ctx, reverted_buffer, bytes);
return 0;
}
finish_hash12(ctx, buffer);
- for (i = 0; i < (hashsize / 8); i++) {
+ for (size_t i = 0; i < (hashsize / 8); i++) {
sprintf(sum + 2 * i, "%02x", buffer[i]);
}
return 1;
const unsigned char *pubkey_buf = NULL;
unsigned char *databuf;
ASN1_OBJECT *palgobj = NULL;
- int pub_len, i, j;
+ int pub_len;
EC_POINT *pub_key;
BIGNUM *X, *Y;
ASN1_OCTET_STRING *octet = NULL;
- int len;
+ size_t len;
const EC_GROUP *group;
if (!X509_PUBKEY_get0_param(&palgobj, &pubkey_buf, &pub_len, &palg, pub))
ASN1_OBJECT *algobj = NULL;
ASN1_OCTET_STRING *octet = NULL;
void *pval = NULL;
- unsigned char *buf = NULL, *databuf = NULL, *sptr;
- int i, j, data_len, ret = -1;
+ unsigned char *buf = NULL, *databuf = NULL;
+ int data_len, ret = -1;
const EC_POINT *pub_key;
BIGNUM *X = NULL, *Y = NULL, *order = NULL;
const EC_KEY *ec = EVP_PKEY_get0((EVP_PKEY *)pk);
BIGNUM *UKM = NULL, *p = NULL, *order = NULL, *X = NULL, *Y = NULL;
const BIGNUM *key = EC_KEY_get0_private_key(priv_key);
EC_POINT *pnt = EC_POINT_new(EC_KEY_get0_group(priv_key));
- int i;
BN_CTX *ctx = BN_CTX_new();
EVP_MD_CTX *mdctx = NULL;
const EVP_MD *md = NULL;
int gost_grasshopper_set_asn1_parameters(EVP_CIPHER_CTX* ctx, ASN1_TYPE* params) {
int len = 0;
unsigned char* buf = NULL;
- unsigned char* p = NULL;
ASN1_OCTET_STRING* os = NULL;
os = ASN1_OCTET_STRING_new();