[openssl] master update
dev at ddvo.net
dev at ddvo.net
Wed Aug 25 05:21:22 UTC 2021
The branch master has been updated
via 32f7be2ab72ee22e98a2254709cb6128492b207a (commit)
from fdd436436d337f54e1e9d57b46b9489f7a3d042d (commit)
- Log -----------------------------------------------------------------
commit 32f7be2ab72ee22e98a2254709cb6128492b207a
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date: Tue Aug 17 19:57:08 2021 +0200
APPS: Fix result type of dump_cert_text() and behavior of print_name() on out==NULL
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16344)
-----------------------------------------------------------------------
Summary of changes:
apps/include/apps.h | 2 +-
apps/lib/apps.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/apps/include/apps.h b/apps/include/apps.h
index bc8c6359f3..9d5db16600 100644
--- a/apps/include/apps.h
+++ b/apps/include/apps.h
@@ -94,7 +94,7 @@ typedef struct args_st {
int wrap_password_callback(char *buf, int bufsiz, int verify, void *cb_data);
int chopup_args(ARGS *arg, char *buf);
-int dump_cert_text(BIO *out, X509 *x);
+void dump_cert_text(BIO *out, X509 *x);
void print_name(BIO *out, const char *title, const X509_NAME *nm);
void print_bignum_var(BIO *, const BIGNUM *, const char*,
int, unsigned char *);
diff --git a/apps/lib/apps.c b/apps/lib/apps.c
index 9762001b6a..43c01401e8 100644
--- a/apps/lib/apps.c
+++ b/apps/lib/apps.c
@@ -200,14 +200,10 @@ unsigned long get_nameopt(void)
return (nmflag_set) ? nmflag : XN_FLAG_ONELINE;
}
-int dump_cert_text(BIO *out, X509 *x)
+void dump_cert_text(BIO *out, X509 *x)
{
print_name(out, "subject=", X509_get_subject_name(x));
- BIO_puts(out, "\n");
print_name(out, "issuer=", X509_get_issuer_name(x));
- BIO_puts(out, "\n");
-
- return 0;
}
int wrap_password_callback(char *buf, int bufsiz, int verify, void *userdata)
@@ -1289,6 +1285,8 @@ void print_name(BIO *out, const char *title, const X509_NAME *nm)
int indent = 0;
unsigned long lflags = get_nameopt();
+ if (out == NULL)
+ return;
if (title != NULL)
BIO_puts(out, title);
if ((lflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) {
More information about the openssl-commits
mailing list