mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
pki_gcrypt: Added pki_sign_data() and pki_verify_data_signature()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
7bc53f3957
commit
88a8b1f57c
@@ -168,7 +168,6 @@ static void torture_pki_dsa_import_privkey_base64(void **state)
|
||||
SSH_KEY_FREE(key);
|
||||
}
|
||||
|
||||
#if defined(HAVE_LIBCRYPTO) || defined(HAVE_LIBMBEDCRYPTO)
|
||||
static int test_sign_verify_data(ssh_key key,
|
||||
enum ssh_digest_e hash_type,
|
||||
const unsigned char *input,
|
||||
@@ -228,7 +227,7 @@ static void torture_pki_sign_data_dsa(void **state)
|
||||
/* Cleanup */
|
||||
SSH_KEY_FREE(key);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBCRYPTO
|
||||
static void torture_pki_dsa_write_privkey(void **state)
|
||||
{
|
||||
@@ -770,9 +769,7 @@ int torture_run_tests(void)
|
||||
setup_dsa_key,
|
||||
teardown),
|
||||
#endif
|
||||
#if defined(HAVE_LIBCRYPTO) || defined(HAVE_LIBMBEDCRYPTO)
|
||||
cmocka_unit_test(torture_pki_sign_data_dsa),
|
||||
#endif
|
||||
cmocka_unit_test(torture_pki_dsa_import_privkey_base64_passphrase),
|
||||
cmocka_unit_test(torture_pki_dsa_import_openssh_privkey_base64_passphrase),
|
||||
|
||||
|
||||
@@ -610,7 +610,6 @@ static void torture_pki_ecdsa_cert_verify(void **state)
|
||||
ssh_free(session);
|
||||
}
|
||||
|
||||
#if defined(HAVE_LIBCRYPTO) || defined(HAVE_LIBMBEDCRYPTO)
|
||||
static int test_sign_verify_data(ssh_key key,
|
||||
enum ssh_digest_e hash_type,
|
||||
const unsigned char *input,
|
||||
@@ -670,7 +669,7 @@ static void torture_pki_sign_data_ecdsa(void **state)
|
||||
/* Cleanup */
|
||||
SSH_KEY_FREE(key);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBCRYPTO
|
||||
static void torture_pki_ecdsa_write_privkey(void **state)
|
||||
{
|
||||
@@ -900,9 +899,7 @@ int torture_run_tests(void) {
|
||||
setup_ecdsa_key_521,
|
||||
teardown),
|
||||
#endif /* HAVE_LIBCRYPTO */
|
||||
#if defined(HAVE_LIBCRYPTO) || defined(HAVE_LIBMBEDCRYPTO)
|
||||
cmocka_unit_test(torture_pki_sign_data_ecdsa),
|
||||
#endif
|
||||
cmocka_unit_test_setup_teardown(torture_pki_ecdsa_name256,
|
||||
setup_ecdsa_key_256,
|
||||
teardown),
|
||||
|
||||
@@ -563,7 +563,6 @@ static void torture_pki_rsa_sha2(void **state)
|
||||
ssh_free(session);
|
||||
}
|
||||
|
||||
#if defined(HAVE_LIBCRYPTO) || defined(HAVE_LIBMBEDCRYPTO)
|
||||
static int test_sign_verify_data(ssh_key key,
|
||||
enum ssh_digest_e hash_type,
|
||||
const unsigned char *input,
|
||||
@@ -623,7 +622,7 @@ static void torture_pki_sign_data_rsa(void **state)
|
||||
/* Cleanup */
|
||||
SSH_KEY_FREE(key);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBCRYPTO
|
||||
static void torture_pki_rsa_write_privkey(void **state)
|
||||
{
|
||||
@@ -843,9 +842,7 @@ int torture_run_tests(void) {
|
||||
setup_rsa_key,
|
||||
teardown),
|
||||
#endif /* HAVE_LIBCRYPTO */
|
||||
#if defined(HAVE_LIBCRYPTO) || defined(HAVE_LIBMBEDCRYPTO)
|
||||
cmocka_unit_test(torture_pki_sign_data_rsa),
|
||||
#endif
|
||||
cmocka_unit_test_setup_teardown(torture_pki_rsa_sha2,
|
||||
setup_rsa_key,
|
||||
teardown),
|
||||
|
||||
Reference in New Issue
Block a user