pkcs11-tool: cleanup whitespace and remove unused OpenSSL ERR_* calls.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4747 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2010-09-21 16:11:31 +00:00
parent 2dff969e05
commit 50952cdcba
1 changed files with 34 additions and 43 deletions

View File

@ -518,10 +518,6 @@ int main(int argc, char * argv[])
if (action_count == 0)
util_print_usage_and_die(app_name, options, option_help);
#ifdef ENABLE_OPENSSL
/* ERR_load_crypto_strings(); */
#endif
module = C_LoadModule(opt_module, &p11);
if (module == NULL)
util_fatal("Failed to load pkcs11 module");
@ -555,7 +551,7 @@ int main(int argc, char * argv[])
opt_slot = p11_slots[opt_slot_index];
fprintf(stderr, "Using slot with index %lu (0x%lx)\n", opt_slot_index, opt_slot);
} else {
fprintf(stderr, "Slot with index %lu (counting from 0) is not available\n");
fprintf(stderr, "Slot with index %lu (counting from 0) is not available.\n");
fprintf(stderr, "You must specify a valid slot with either --slot, --slot-index or --slot-label.\n");
err = 1;
goto end;
@ -1329,7 +1325,6 @@ static void parse_certificate(struct x509cert_info *cert,
pp = data;
x = d2i_X509(NULL, &pp, len);
if (!x) {
/* ERR_print_errors_fp(stderr); */
util_fatal("OpenSSL error during X509 certificate parsing");
}
p = cert->subject;
@ -1374,7 +1369,6 @@ static void parse_rsa_private_key(struct rsakey_info *rsa,
p = data;
r = d2i_RSAPrivateKey(NULL, &p, len);
if (!r) {
/* ERR_print_errors_fp(stderr); */
util_fatal("OpenSSL error during RSA private key parsing");
}
RSA_GET_BN(modulus, r->n);
@ -1401,7 +1395,6 @@ static void parse_rsa_public_key(struct rsakey_info *rsa,
}
if (!r) {
/* ERR_print_errors_fp(stderr); */
util_fatal("OpenSSL error during RSA public key parsing");
}
RSA_GET_BN(modulus, r->n);
@ -2500,7 +2493,6 @@ static EVP_PKEY *get_public_key(CK_SESSION_HANDLE session, CK_OBJECT_HANDLE priv
if (pkey == NULL) {
printf(" couldn't parse pubkey, no verification done\n");
/* ERR_print_errors_fp(stderr); */
return NULL;
}
@ -2571,7 +2563,6 @@ static int sign_verify_openssl(CK_SLOT_ID slot, CK_SESSION_HANDLE session,
errors++;
} else if (err != 1) {
printf("openssl error during verification: 0x%0x (%d)\n", err, err);
/* ERR_print_errors_fp(stderr); */
} else
printf("OK\n");