mirror of
https://github.com/status-im/sqlcipher.git
synced 2025-02-24 01:38:09 +00:00
fix build warnings under VS
This commit is contained in:
parent
2c22d1e431
commit
581876802e
@ -72,6 +72,7 @@ static int sqlcipher_openssl_activate(void *ctx) {
|
|||||||
}
|
}
|
||||||
openssl_init_count++;
|
openssl_init_count++;
|
||||||
}
|
}
|
||||||
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* deactivate SQLCipher, most imporantly decremeting the activation count and
|
/* deactivate SQLCipher, most imporantly decremeting the activation count and
|
||||||
@ -92,6 +93,7 @@ static int sqlcipher_openssl_deactivate(void *ctx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
|
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
|
||||||
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* sqlcipher_openssl_get_provider_name(void *ctx) {
|
static const char* sqlcipher_openssl_get_provider_name(void *ctx) {
|
||||||
@ -105,7 +107,7 @@ static int sqlcipher_openssl_random (void *ctx, void *buffer, int length) {
|
|||||||
|
|
||||||
static int sqlcipher_openssl_hmac(void *ctx, unsigned char *hmac_key, int key_sz, unsigned char *in, int in_sz, unsigned char *in2, int in2_sz, unsigned char *out) {
|
static int sqlcipher_openssl_hmac(void *ctx, unsigned char *hmac_key, int key_sz, unsigned char *in, int in_sz, unsigned char *in2, int in2_sz, unsigned char *out) {
|
||||||
HMAC_CTX hctx;
|
HMAC_CTX hctx;
|
||||||
int outlen;
|
unsigned int outlen;
|
||||||
HMAC_CTX_init(&hctx);
|
HMAC_CTX_init(&hctx);
|
||||||
HMAC_Init_ex(&hctx, hmac_key, key_sz, EVP_sha1(), NULL);
|
HMAC_Init_ex(&hctx, hmac_key, key_sz, EVP_sha1(), NULL);
|
||||||
HMAC_Update(&hctx, in, in_sz);
|
HMAC_Update(&hctx, in, in_sz);
|
||||||
@ -204,6 +206,7 @@ int sqlcipher_openssl_setup(sqlcipher_provider *p) {
|
|||||||
p->ctx_init = sqlcipher_openssl_ctx_init;
|
p->ctx_init = sqlcipher_openssl_ctx_init;
|
||||||
p->ctx_free = sqlcipher_openssl_ctx_free;
|
p->ctx_free = sqlcipher_openssl_ctx_free;
|
||||||
p->add_random = sqlcipher_openssl_add_random;
|
p->add_random = sqlcipher_openssl_add_random;
|
||||||
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user