~vcs-imports/libssh/trunk

« back to all changes in this revision

Viewing changes to tests/torture.c

  • Committer: Sahana Prasad
  • Date: 2020-05-20 10:49:29 UTC
  • Revision ID: git-v1:7eb6c7ee6c1633d6fe73fd094ba3aa80d9f1cb3d
tests/torture.c: update the definition of torture_setup_tokens() to take load_public as an option that
                 determines if public keys must be loaded in pkcs #11 tokens or not.
tests:           Adds the load_public parameter in all files where torture_setup_tokens() was used.

Signed-off-by: Sahana Prasad <sahana@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1127
1127
 
1128
1128
void torture_setup_tokens(const char *temp_dir,
1129
1129
                          const char *filename,
1130
 
                          const char object_name[])
 
1130
                          const char object_name[],
 
1131
                          const char *load_public)
1131
1132
{
1132
1133
    char token_setup_start_cmd[1024] = {0};
1133
1134
    int rc;
1134
1135
 
1135
1136
    snprintf(token_setup_start_cmd, sizeof(token_setup_start_cmd),
1136
 
             "%s/tests/pkcs11/setup-softhsm-tokens.sh %s %s %s",
 
1137
             "%s/tests/pkcs11/setup-softhsm-tokens.sh %s %s %s %s",
1137
1138
             BINARYDIR,
1138
1139
             temp_dir,
1139
 
             filename, object_name);
 
1140
             filename,
 
1141
             object_name, load_public);
1140
1142
 
1141
1143
    rc = system(token_setup_start_cmd);
1142
1144
    assert_return_code(rc, errno);