[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Thu Jan 4 18:55:21 UTC 2018


The branch master has been updated
       via  7838b413339240c6aac562f636310033db201dd7 (commit)
      from  32b28859e0e194b8995cb9bcf2c9d65d4516835b (commit)


- Log -----------------------------------------------------------------
commit 7838b413339240c6aac562f636310033db201dd7
Author: Rich Salz <rsalz at openssl.org>
Date:   Wed Jan 3 13:12:20 2018 -0500

    Rewrite RT3513.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5011)

-----------------------------------------------------------------------

Summary of changes:
 crypto/x509/t_req.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/crypto/x509/t_req.c b/crypto/x509/t_req.c
index 859bcd0..7c0bd42 100644
--- a/crypto/x509/t_req.c
+++ b/crypto/x509/t_req.c
@@ -135,16 +135,19 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
                         goto err;
                 if (BIO_puts(bp, ":") <= 0)
                     goto err;
-                if ((type == V_ASN1_PRINTABLESTRING) ||
-                    (type == V_ASN1_T61STRING) ||
-                    (type == V_ASN1_UTF8STRING) ||
-                    (type == V_ASN1_IA5STRING)) {
+                switch (type) {
+                case V_ASN1_PRINTABLESTRING:
+                case V_ASN1_T61STRING:
+                case V_ASN1_UTF8STRING:
+                case V_ASN1_IA5STRING:
                     if (BIO_write(bp, (char *)bs->data, bs->length)
-                        != bs->length)
+                            != bs->length)
                         goto err;
                     BIO_puts(bp, "\n");
-                } else {
+                    break;
+                default:
                     BIO_puts(bp, "unable to print attribute\n");
+                    break;
                 }
                 if (++ii < count)
                     goto get_next;


More information about the openssl-commits mailing list