Author: biurrun Date: Mon Mar 12 19:19:02 2012 New Revision: 2911 Log: pisa-cert-info: Give more sensible names to some variables. Modified: trunk/community-operator/client/pisa-cert-info.c Modified: trunk/community-operator/client/pisa-cert-info.c ============================================================================== --- trunk/community-operator/client/pisa-cert-info.c Mon Mar 12 19:11:09 2012 (r2910) +++ trunk/community-operator/client/pisa-cert-info.c Mon Mar 12 19:19:02 2012 (r2911) @@ -36,15 +36,15 @@ int X509_print_fp_cop(FILE *fp, X509 *x) { - BIO *b; + BIO *bp; int ret; - if ((b = BIO_new(BIO_s_file())) == NULL) { + if ((bp = BIO_new(BIO_s_file())) == NULL) { return 0; } - BIO_set_fp(b, fp, BIO_NOCLOSE); - ret = print_cert_info(b, x); - BIO_free(b); + BIO_set_fp(bp, fp, BIO_NOCLOSE); + ret = print_cert_info(bp, x); + BIO_free(bp); return ret; } @@ -55,8 +55,8 @@ char *s; X509_CINF *ci; ASN1_INTEGER *bs; - EVP_PKEY *pkey = NULL; - const char *neg; + EVP_PKEY *publickey = NULL; + const char *negative; X509_EXTENSION *ex; ASN1_STRING *str = NULL; @@ -81,17 +81,17 @@ if (bs->length <= 4) { l = ASN1_INTEGER_get(bs); if (l < 0) { - l = -l; - neg = "-"; + l = -l; + negative = "-"; } else { - neg = ""; + negative = ""; } - if (BIO_printf(bp, " %s%lu (%s0x%lx)", neg, l, neg, l) <= 0) { + if (BIO_printf(bp, " %s%lu (%s0x%lx)", negative, l, negative, l) <= 0) { goto err; } } else { - neg = (bs->type == V_ASN1_NEG_INTEGER) ? " (Negative)" : ""; - if (BIO_printf(bp, "\n%12s%s", "", neg) <= 0) { + negative = (bs->type == V_ASN1_NEG_INTEGER) ? " (Negative)" : ""; + if (BIO_printf(bp, "\n%12s%s", "", negative) <= 0) { goto err; } @@ -156,28 +156,28 @@ goto err; } - pkey = X509_get_pubkey(x); - if (pkey == NULL) { + publickey = X509_get_pubkey(x); + if (publickey == NULL) { BIO_printf(bp, "%12sUnable to load Public Key\n", ""); } else #ifndef NO_RSA - if (pkey->type == EVP_PKEY_RSA) { + if (publickey->type == EVP_PKEY_RSA) { BIO_printf(bp, "%12sRSA Public Key: (%d bit)\n", "", - BN_num_bits(pkey->pkey.rsa->n)); - RSA_print(bp, pkey->pkey.rsa, 16); + BN_num_bits(publickey->pkey.rsa->n)); + RSA_print(bp, publickey->pkey.rsa, 16); } else #endif #ifndef NO_DSA - if (pkey->type == EVP_PKEY_DSA) { + if (publickey->type == EVP_PKEY_DSA) { BIO_printf(bp, "%12sDSA Public Key:\n", ""); - DSA_print(bp, pkey->pkey.dsa, 16); + DSA_print(bp, publickey->pkey.dsa, 16); } else #endif { BIO_printf(bp, "%12sUnknown Public Key:\n", ""); } tclose(bp); BIO_printf(bp, "</table>\n"); - EVP_PKEY_free(pkey); + EVP_PKEY_free(publickey); n = X509_get_ext_count(x); if (n > 0) { -- This is the pisa developer mailing list. Please also subscribe to the main pisa list at: //www.freelists.org/list/pisa