Fix PSS signature printing.
authorDr. Stephen Henson <steve@openssl.org>
Sun, 5 May 2013 12:34:03 +0000 (13:34 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 5 Jun 2013 14:06:03 +0000 (15:06 +0100)
Fix PSS signature printing: consistently use 0x prefix for hex values for
padding length and trailer fields.

crypto/rsa/rsa_ameth.c

index 2460910ab2783e5dc198e6437462a18e32f7f9b8..5a2062f903ae8bcb02d82ae21c4766f534e52271 100644 (file)
@@ -351,27 +351,27 @@ static int rsa_pss_param_print(BIO *bp, RSA_PSS_PARAMS *pss,
 
        if (!BIO_indent(bp, indent, 128))
                goto err;
-       if (BIO_puts(bp, "Salt Length: ") <= 0)
+       if (BIO_puts(bp, "Salt Length: 0x") <= 0)
                        goto err;
        if (pss->saltLength)
                {
                if (i2a_ASN1_INTEGER(bp, pss->saltLength) <= 0)
                        goto err;
                }
-       else if (BIO_puts(bp, "20 (default)") <= 0)
+       else if (BIO_puts(bp, "0x14 (default)") <= 0)
                goto err;
        BIO_puts(bp, "\n");
 
        if (!BIO_indent(bp, indent, 128))
                goto err;
-       if (BIO_puts(bp, "Trailer Field: ") <= 0)
+       if (BIO_puts(bp, "Trailer Field: 0x") <= 0)
                        goto err;
        if (pss->trailerField)
                {
                if (i2a_ASN1_INTEGER(bp, pss->trailerField) <= 0)
                        goto err;
                }
-       else if (BIO_puts(bp, "0xbc (default)") <= 0)
+       else if (BIO_puts(bp, "BC (default)") <= 0)
                goto err;
        BIO_puts(bp, "\n");