* eet: Revert back some INF macro to fprintf as this is not for logging purpose.

SVN revision: 42901
This commit is contained in:
Cedric BAIL 2009-10-06 12:07:29 +00:00
parent f5821e813c
commit 3927d4a74f
2 changed files with 12 additions and 12 deletions

View File

@ -260,11 +260,11 @@ do_eet_check(const char *file)
der = eet_identity_x509(ef, &der_length); der = eet_identity_x509(ef, &der_length);
ERR("Certificate length %i.\n", der_length); fprintf(stdout, "Certificate length %i.\n", der_length);
eet_identity_certificate_print(der, der_length, stdout); eet_identity_certificate_print(der, der_length, stdout);
eet_identity_signature(ef, &sign_length); eet_identity_signature(ef, &sign_length);
ERR("Signature length %i.\n", sign_length); fprintf(stdout, "Signature length %i.\n", sign_length);
eet_close(ef); eet_close(ef);
} }
@ -289,7 +289,7 @@ do_eet_sign(const char *file, const char *private_key, const char *public_key)
exit(-1); exit(-1);
} }
ERR("Using the following key to sign `%s`.\n", file); fprintf(stdout, "Using the following key to sign `%s`.\n", file);
eet_identity_print(key, stdout); eet_identity_print(key, stdout);
eet_identity_set(ef, key); eet_identity_set(ef, key);

View File

@ -272,7 +272,7 @@ eet_identity_print(Eet_Key *key, FILE *out)
goto on_error; goto on_error;
if (!(res = malloc(size))) goto on_error; if (!(res = malloc(size))) goto on_error;
INF("Private Key:"); fprintf(out, "Private Key:\n");
buf[32] = '\0'; buf[32] = '\0';
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
@ -284,11 +284,11 @@ eet_identity_print(Eet_Key *key, FILE *out)
} }
if (err) goto on_error; if (err) goto on_error;
INF("\t%s:", names[i]); fprintf(out, "\t%s:\n", names[i]);
for (j = 0; strlen(res) > j; j += 32) for (j = 0; strlen(res) > j; j += 32)
{ {
snprintf(buf, 32, "%s", res + j); snprintf(buf, 32, "%s", res + j);
INF("\t\t%s", buf); fprintf(out, "\t\t%s\n", buf);
} }
} }
free(res); free(res);
@ -297,9 +297,9 @@ eet_identity_print(Eet_Key *key, FILE *out)
if (key->certificate) if (key->certificate)
{ {
INF("Public certificate:"); fprintf(out, "Public certificate:\n");
if (gnutls_x509_crt_print(key->certificate, GNUTLS_X509_CRT_FULL, &data)) goto on_error; if (gnutls_x509_crt_print(key->certificate, GNUTLS_X509_CRT_FULL, &data)) goto on_error;
INF("%s", data.data); fprintf(out, "%s\n", data.data);
gnutls_free(data.data); gnutls_free(data.data);
data.data = NULL; data.data = NULL;
} }
@ -318,25 +318,25 @@ eet_identity_print(Eet_Key *key, FILE *out)
rsa = EVP_PKEY_get1_RSA(key->private_key); rsa = EVP_PKEY_get1_RSA(key->private_key);
if (rsa) if (rsa)
{ {
INF("Private key (RSA):"); fprintf(out, "Private key (RSA):\n");
RSA_print_fp(out, rsa, 0); RSA_print_fp(out, rsa, 0);
} }
dsa = EVP_PKEY_get1_DSA(key->private_key); dsa = EVP_PKEY_get1_DSA(key->private_key);
if (dsa) if (dsa)
{ {
INF("Private key (DSA):"); fprintf(out, "Private key (DSA):\n");
DSA_print_fp(out, dsa, 0); DSA_print_fp(out, dsa, 0);
} }
dh = EVP_PKEY_get1_DH(key->private_key); dh = EVP_PKEY_get1_DH(key->private_key);
if (dh) if (dh)
{ {
INF("Private key (DH):"); fprintf(out, "Private key (DH):\n");
DHparams_print_fp(out, dh); DHparams_print_fp(out, dh);
} }
INF("Public certificate:"); fprintf(out, "Public certificate:\n");
X509_print_fp(out, key->certificate); X509_print_fp(out, key->certificate);
# endif # endif
#else #else