diff --git a/src/libgcrypt.c b/src/libgcrypt.c index 5b31ff3..b16bb6c 100644 --- a/src/libgcrypt.c +++ b/src/libgcrypt.c @@ -57,6 +57,10 @@ int _libssh2_rsa_new(libssh2_rsa_ctx **rsa, unsigned long coefflen) { int rc; + (void)e1data; + (void)e1len; + (void)e2data; + (void)e2len; if (ddata) { 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, const unsigned char *sig, + unsigned long sig_len, const unsigned char *m, unsigned long m_len) { unsigned char hash[SHA_DIGEST_LENGTH]; - int ret; gcry_sexp_t s_sig, s_hash; 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; unsigned int nlen, elen, dlen, plen, qlen, e1len, e2len, coefflen; + (void)passphrase; + ret = _libssh2_pem_parse (session, "-----BEGIN 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; unsigned int plen, qlen, glen, ylen, xlen; + (void)passphrase; + ret = _libssh2_pem_parse (session, "-----BEGIN DSA PRIVATE KEY-----", "-----END DSA PRIVATE KEY-----", @@ -470,12 +478,10 @@ out: int _libssh2_dsa_sha1_verify(libssh2_dsa_ctx *dsactx, const unsigned char *sig, - unsigned long sig_len, const unsigned char *m, unsigned long m_len) { unsigned char hash[SHA_DIGEST_LENGTH+1]; - int ret; gcry_sexp_t s_sig, s_hash; int rc = -1; @@ -509,6 +515,8 @@ int _libssh2_cipher_init (_libssh2_cipher_ctx *h, int mode = 0, ret; int keylen = gcry_cipher_get_algo_keylen (algo); + (void)encrypt; + if (algo != GCRY_CIPHER_ARCFOUR) { mode = GCRY_CIPHER_MODE_CBC; } diff --git a/src/libgcrypt.h b/src/libgcrypt.h index f6ec8bf..4853f95 100644 --- a/src/libgcrypt.h +++ b/src/libgcrypt.h @@ -149,10 +149,10 @@ int _libssh2_dsa_sha1_verify(libssh2_dsa_ctx *dsa, const unsigned char *sig, const unsigned char *m, unsigned long m_len); -int _libssh2_dsa_sign(libssh2_dsa_ctx *dsactx, - const unsigned char *hash, - unsigned long hash_len, - unsigned char *sig); +int _libssh2_dsa_sha1_sign(libssh2_dsa_ctx *dsactx, + const unsigned char *hash, + unsigned long hash_len, + unsigned char *sig); #define _libssh2_dsa_free(dsactx) gcry_sexp_release (dsactx)