|
Greenbone Vulnerability Management Libraries 22.35.9
|
#include "sshutils.c"#include <cgreen/cgreen.h>#include <cgreen/mocks.h>#include <glib.h>#include <string.h>
Go to the source code of this file.
Functions | |
| Describe (sshutils) | |
| BeforeEach (sshutils) | |
| AfterEach (sshutils) | |
| Ensure (sshutils, gvm_ssh_pkcs8_decrypt_returns_null_for_null_pkcs8_key) | |
| Ensure (sshutils, gvm_ssh_pkcs8_decrypt_handles_empty_passphrase) | |
| Ensure (sshutils, gvm_ssh_pkcs8_decrypt_handles_null_passphrase) | |
| Ensure (sshutils, gvm_ssh_pkcs8_decrypt_returns_null_for_invalid_key) | |
| Ensure (sshutils, gvm_ssh_pkcs8_decrypt_decrypts_rsa_key_correctly) | |
| Ensure (sshutils, gvm_ssh_pkcs8_decrypt_decrypts_ecdsa_key_correctly) | |
| Ensure (sshutils, gvm_ssh_pkcs8_decrypt_decrypts_ed25519_key_correctly) | |
| Ensure (sshutils, gvm_ssh_pkcs8_decrypt_handles_unencrypted_keys) | |
| Ensure (sshutils, gvm_ssh_public_from_private_returns_null_for_null_private_key) | |
| Ensure (sshutils, gvm_ssh_public_from_private_handles_invalid_private_key) | |
| Ensure (sshutils, gvm_ssh_public_from_private_handles_null_passphrase) | |
| Ensure (sshutils, gvm_ssh_public_from_private_handles_empty_passphrase) | |
| Ensure (sshutils, gvm_ssh_public_from_private_generates_rsa_public_key) | |
| Ensure (sshutils, gvm_ssh_public_from_private_generates_ecdsa_public_key) | |
| Ensure (sshutils, gvm_ssh_public_from_private_generates_ed25519_public_key) | |
| Ensure (sshutils, gvm_ssh_public_from_private_handles_encrypted_keys) | |
| Ensure (sshutils, gvm_ssh_public_from_private_handles_wrong_passphrase) | |
| Ensure (sshutils, gvm_ssh_private_key_info_returns_minus_one_for_null_private_key) | |
| Ensure (sshutils, gvm_ssh_private_key_info_handles_null_type_and_hash_pointers) | |
| Ensure (sshutils, gvm_ssh_private_key_info_handles_null_type_pointer) | |
| Ensure (sshutils, gvm_ssh_private_key_info_handles_null_hash_pointer) | |
| Ensure (sshutils, gvm_ssh_private_key_info_handles_invalid_private_key) | |
| Ensure (sshutils, gvm_ssh_private_key_info_handles_null_passphrase) | |
| Ensure (sshutils, gvm_ssh_private_key_info_handles_empty_passphrase) | |
| Ensure (sshutils, gvm_ssh_private_key_info_gets_rsa_key_type_and_hash) | |
| Ensure (sshutils, gvm_ssh_private_key_info_gets_ecdsa_key_type_and_hash) | |
| Ensure (sshutils, gvm_ssh_private_key_info_gets_ed25519_key_type_and_hash) | |
| Ensure (sshutils, gvm_ssh_private_key_info_handles_encrypted_keys) | |
| Ensure (sshutils, gvm_ssh_private_key_info_handles_wrong_passphrase) | |
| Ensure (sshutils, gvm_ssh_private_key_info_can_get_just_type) | |
| Ensure (sshutils, gvm_ssh_private_key_info_can_get_just_hash) | |
| int | main (int argc, char **argv) |
Variables | |
| static const char * | test_rsa_pkcs8_encrypted |
| static const char * | test_rsa_pkcs8_unencrypted |
| static const char * | test_ecdsa_pkcs8_encrypted |
| static const char * | test_ecdsa_openssh_private |
| static const char * | test_ed25519_pkcs8_encrypted |
| static const char * | test_ed25519_openssh_private |
| static const char * | test_rsa_public_expected |
| static const char * | test_ecdsa_public_expected |
| static const char * | test_ed25519_public_expected |
| static const char * | expected_rsa_sha256_hash |
| static const char * | expected_ecdsa_sha256_hash |
| static const char * | expected_ed25519_sha256_hash |
| AfterEach | ( | sshutils | ) |
Definition at line 120 of file sshutils_tests.c.
| BeforeEach | ( | sshutils | ) |
Definition at line 116 of file sshutils_tests.c.
| Describe | ( | sshutils | ) |
| Ensure | ( | sshutils | , |
| gvm_ssh_pkcs8_decrypt_decrypts_ecdsa_key_correctly | ) |
Definition at line 173 of file sshutils_tests.c.
References gvm_ssh_pkcs8_decrypt(), and test_ecdsa_pkcs8_encrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_pkcs8_decrypt_decrypts_ed25519_key_correctly | ) |
Definition at line 183 of file sshutils_tests.c.
References gvm_ssh_pkcs8_decrypt(), and test_ed25519_pkcs8_encrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_pkcs8_decrypt_decrypts_rsa_key_correctly | ) |
Definition at line 163 of file sshutils_tests.c.
References gvm_ssh_pkcs8_decrypt(), and test_rsa_pkcs8_encrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_pkcs8_decrypt_handles_empty_passphrase | ) |
Definition at line 132 of file sshutils_tests.c.
References gvm_ssh_pkcs8_decrypt(), gvm_ssh_public_from_private(), test_rsa_pkcs8_unencrypted, and test_rsa_public_expected.

| Ensure | ( | sshutils | , |
| gvm_ssh_pkcs8_decrypt_handles_null_passphrase | ) |
Definition at line 150 of file sshutils_tests.c.
References gvm_ssh_pkcs8_decrypt().

| Ensure | ( | sshutils | , |
| gvm_ssh_pkcs8_decrypt_handles_unencrypted_keys | ) |
Definition at line 193 of file sshutils_tests.c.
References gvm_ssh_pkcs8_decrypt(), and test_rsa_pkcs8_unencrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_pkcs8_decrypt_returns_null_for_invalid_key | ) |
Definition at line 156 of file sshutils_tests.c.
References gvm_ssh_pkcs8_decrypt().

| Ensure | ( | sshutils | , |
| gvm_ssh_pkcs8_decrypt_returns_null_for_null_pkcs8_key | ) |
Definition at line 126 of file sshutils_tests.c.
References gvm_ssh_pkcs8_decrypt().

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_can_get_just_hash | ) |
Definition at line 441 of file sshutils_tests.c.
References gvm_ssh_private_key_info(), and test_rsa_pkcs8_unencrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_can_get_just_type | ) |
Definition at line 432 of file sshutils_tests.c.
References gvm_ssh_private_key_info(), and test_rsa_pkcs8_unencrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_gets_ecdsa_key_type_and_hash | ) |
Definition at line 377 of file sshutils_tests.c.
References expected_ecdsa_sha256_hash, gvm_ssh_private_key_info(), and test_ecdsa_openssh_private.

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_gets_ed25519_key_type_and_hash | ) |
Definition at line 393 of file sshutils_tests.c.
References expected_ed25519_sha256_hash, gvm_ssh_private_key_info(), and test_ed25519_openssh_private.

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_gets_rsa_key_type_and_hash | ) |
Definition at line 361 of file sshutils_tests.c.
References expected_rsa_sha256_hash, gvm_ssh_private_key_info(), and test_rsa_pkcs8_unencrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_handles_empty_passphrase | ) |
Definition at line 345 of file sshutils_tests.c.
References expected_rsa_sha256_hash, gvm_ssh_private_key_info(), and test_rsa_pkcs8_unencrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_handles_encrypted_keys | ) |
Definition at line 409 of file sshutils_tests.c.
References gvm_ssh_private_key_info(), and test_rsa_pkcs8_encrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_handles_invalid_private_key | ) |
Definition at line 323 of file sshutils_tests.c.
References gvm_ssh_private_key_info().

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_handles_null_hash_pointer | ) |
Definition at line 314 of file sshutils_tests.c.
References gvm_ssh_private_key_info().

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_handles_null_passphrase | ) |
Definition at line 334 of file sshutils_tests.c.
References gvm_ssh_private_key_info().

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_handles_null_type_and_hash_pointers | ) |
Definition at line 298 of file sshutils_tests.c.
References gvm_ssh_private_key_info().

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_handles_null_type_pointer | ) |
Definition at line 305 of file sshutils_tests.c.
References gvm_ssh_private_key_info().

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_handles_wrong_passphrase | ) |
Definition at line 421 of file sshutils_tests.c.
References gvm_ssh_private_key_info(), and test_rsa_pkcs8_encrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_private_key_info_returns_minus_one_for_null_private_key | ) |
Definition at line 286 of file sshutils_tests.c.
References gvm_ssh_private_key_info().

| Ensure | ( | sshutils | , |
| gvm_ssh_public_from_private_generates_ecdsa_public_key | ) |
Definition at line 245 of file sshutils_tests.c.
References gvm_ssh_public_from_private(), test_ecdsa_openssh_private, and test_ecdsa_public_expected.

| Ensure | ( | sshutils | , |
| gvm_ssh_public_from_private_generates_ed25519_public_key | ) |
Definition at line 256 of file sshutils_tests.c.
References gvm_ssh_public_from_private(), test_ed25519_openssh_private, and test_ed25519_public_expected.

| Ensure | ( | sshutils | , |
| gvm_ssh_public_from_private_generates_rsa_public_key | ) |
Definition at line 233 of file sshutils_tests.c.
References gvm_ssh_public_from_private(), test_rsa_pkcs8_unencrypted, and test_rsa_public_expected.

| Ensure | ( | sshutils | , |
| gvm_ssh_public_from_private_handles_empty_passphrase | ) |
Definition at line 223 of file sshutils_tests.c.
References gvm_ssh_public_from_private(), test_rsa_pkcs8_unencrypted, and test_rsa_public_expected.

| Ensure | ( | sshutils | , |
| gvm_ssh_public_from_private_handles_encrypted_keys | ) |
Definition at line 268 of file sshutils_tests.c.
References gvm_ssh_public_from_private(), and test_rsa_pkcs8_encrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_public_from_private_handles_invalid_private_key | ) |
Definition at line 210 of file sshutils_tests.c.
References gvm_ssh_public_from_private().

| Ensure | ( | sshutils | , |
| gvm_ssh_public_from_private_handles_null_passphrase | ) |
Definition at line 217 of file sshutils_tests.c.
References gvm_ssh_public_from_private().

| Ensure | ( | sshutils | , |
| gvm_ssh_public_from_private_handles_wrong_passphrase | ) |
Definition at line 277 of file sshutils_tests.c.
References gvm_ssh_public_from_private(), and test_rsa_pkcs8_encrypted.

| Ensure | ( | sshutils | , |
| gvm_ssh_public_from_private_returns_null_for_null_private_key | ) |
Definition at line 204 of file sshutils_tests.c.
References gvm_ssh_public_from_private().

| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 456 of file sshutils_tests.c.
|
static |
Definition at line 109 of file sshutils_tests.c.
Referenced by Ensure().
|
static |
Definition at line 112 of file sshutils_tests.c.
Referenced by Ensure().
|
static |
Definition at line 106 of file sshutils_tests.c.
|
static |
Definition at line 62 of file sshutils_tests.c.
|
static |
Definition at line 53 of file sshutils_tests.c.
Referenced by Ensure().
|
static |
Definition at line 97 of file sshutils_tests.c.
Referenced by Ensure().
|
static |
Definition at line 80 of file sshutils_tests.c.
|
static |
Definition at line 72 of file sshutils_tests.c.
Referenced by Ensure().
|
static |
Definition at line 102 of file sshutils_tests.c.
Referenced by Ensure().
|
static |
Definition at line 15 of file sshutils_tests.c.
Referenced by Ensure(), Ensure(), Ensure(), Ensure(), and Ensure().
|
static |
Definition at line 35 of file sshutils_tests.c.
Referenced by Ensure(), Ensure(), Ensure(), Ensure(), Ensure(), Ensure(), Ensure(), and Ensure().
|
static |
Definition at line 91 of file sshutils_tests.c.