Fix warnings.
This commit is contained in:
@@ -57,6 +57,10 @@ int _libssh2_rsa_new(libssh2_rsa_ctx **rsa,
|
|||||||
unsigned long coefflen)
|
unsigned long coefflen)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
(void)e1data;
|
||||||
|
(void)e1len;
|
||||||
|
(void)e2data;
|
||||||
|
(void)e2len;
|
||||||
|
|
||||||
if (ddata) {
|
if (ddata) {
|
||||||
rc = gcry_sexp_build
|
rc = gcry_sexp_build
|
||||||
@@ -79,11 +83,11 @@ int _libssh2_rsa_new(libssh2_rsa_ctx **rsa,
|
|||||||
|
|
||||||
int _libssh2_rsa_sha1_verify(libssh2_rsa_ctx *rsa,
|
int _libssh2_rsa_sha1_verify(libssh2_rsa_ctx *rsa,
|
||||||
const unsigned char *sig,
|
const unsigned char *sig,
|
||||||
|
unsigned long sig_len,
|
||||||
const unsigned char *m,
|
const unsigned char *m,
|
||||||
unsigned long m_len)
|
unsigned long m_len)
|
||||||
{
|
{
|
||||||
unsigned char hash[SHA_DIGEST_LENGTH];
|
unsigned char hash[SHA_DIGEST_LENGTH];
|
||||||
int ret;
|
|
||||||
gcry_sexp_t s_sig, s_hash;
|
gcry_sexp_t s_sig, s_hash;
|
||||||
int rc = -1;
|
int rc = -1;
|
||||||
|
|
||||||
@@ -154,6 +158,8 @@ int _libssh2_rsa_new_private (libssh2_rsa_ctx **rsa,
|
|||||||
char *n, *e, *d, *p, *q, *e1, *e2, *coeff;
|
char *n, *e, *d, *p, *q, *e1, *e2, *coeff;
|
||||||
unsigned int nlen, elen, dlen, plen, qlen, e1len, e2len, coefflen;
|
unsigned int nlen, elen, dlen, plen, qlen, e1len, e2len, coefflen;
|
||||||
|
|
||||||
|
(void)passphrase;
|
||||||
|
|
||||||
ret = _libssh2_pem_parse (session,
|
ret = _libssh2_pem_parse (session,
|
||||||
"-----BEGIN RSA PRIVATE KEY-----",
|
"-----BEGIN RSA PRIVATE KEY-----",
|
||||||
"-----END RSA PRIVATE KEY-----",
|
"-----END RSA PRIVATE KEY-----",
|
||||||
@@ -248,6 +254,8 @@ int _libssh2_dsa_new_private (libssh2_dsa_ctx **dsa,
|
|||||||
char *p, *q, *g, *y, *x;
|
char *p, *q, *g, *y, *x;
|
||||||
unsigned int plen, qlen, glen, ylen, xlen;
|
unsigned int plen, qlen, glen, ylen, xlen;
|
||||||
|
|
||||||
|
(void)passphrase;
|
||||||
|
|
||||||
ret = _libssh2_pem_parse (session,
|
ret = _libssh2_pem_parse (session,
|
||||||
"-----BEGIN DSA PRIVATE KEY-----",
|
"-----BEGIN DSA PRIVATE KEY-----",
|
||||||
"-----END DSA PRIVATE KEY-----",
|
"-----END DSA PRIVATE KEY-----",
|
||||||
@@ -470,12 +478,10 @@ out:
|
|||||||
|
|
||||||
int _libssh2_dsa_sha1_verify(libssh2_dsa_ctx *dsactx,
|
int _libssh2_dsa_sha1_verify(libssh2_dsa_ctx *dsactx,
|
||||||
const unsigned char *sig,
|
const unsigned char *sig,
|
||||||
unsigned long sig_len,
|
|
||||||
const unsigned char *m,
|
const unsigned char *m,
|
||||||
unsigned long m_len)
|
unsigned long m_len)
|
||||||
{
|
{
|
||||||
unsigned char hash[SHA_DIGEST_LENGTH+1];
|
unsigned char hash[SHA_DIGEST_LENGTH+1];
|
||||||
int ret;
|
|
||||||
gcry_sexp_t s_sig, s_hash;
|
gcry_sexp_t s_sig, s_hash;
|
||||||
int rc = -1;
|
int rc = -1;
|
||||||
|
|
||||||
@@ -509,6 +515,8 @@ int _libssh2_cipher_init (_libssh2_cipher_ctx *h,
|
|||||||
int mode = 0, ret;
|
int mode = 0, ret;
|
||||||
int keylen = gcry_cipher_get_algo_keylen (algo);
|
int keylen = gcry_cipher_get_algo_keylen (algo);
|
||||||
|
|
||||||
|
(void)encrypt;
|
||||||
|
|
||||||
if (algo != GCRY_CIPHER_ARCFOUR) {
|
if (algo != GCRY_CIPHER_ARCFOUR) {
|
||||||
mode = GCRY_CIPHER_MODE_CBC;
|
mode = GCRY_CIPHER_MODE_CBC;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ int _libssh2_dsa_sha1_verify(libssh2_dsa_ctx *dsa,
|
|||||||
const unsigned char *sig,
|
const unsigned char *sig,
|
||||||
const unsigned char *m,
|
const unsigned char *m,
|
||||||
unsigned long m_len);
|
unsigned long m_len);
|
||||||
int _libssh2_dsa_sign(libssh2_dsa_ctx *dsactx,
|
int _libssh2_dsa_sha1_sign(libssh2_dsa_ctx *dsactx,
|
||||||
const unsigned char *hash,
|
const unsigned char *hash,
|
||||||
unsigned long hash_len,
|
unsigned long hash_len,
|
||||||
unsigned char *sig);
|
unsigned char *sig);
|
||||||
|
|||||||
Reference in New Issue
Block a user