From: Dr. David von Oheimb <David.von.Oheimb@siemens.com>
Date: Fri, 29 May 2020 19:52:27 +0000 (+0200)
Subject: Remove extra newline from CMP mock server error and add TODO on using request template
X-Git-Tag: openssl-3.0.0-alpha4~107
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5e7be6e666aa5cbb02b929fe09f43e0ba757444a;p=oweals%2Fopenssl.git

Remove extra newline from CMP mock server error and add TODO on using request template

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11998)
---

diff --git a/apps/cmp.c b/apps/cmp.c
index c0fd3e3495..f80410fe9c 100644
--- a/apps/cmp.c
+++ b/apps/cmp.c
@@ -2996,7 +2996,7 @@ int cmp_main(int argc, char **argv)
             if (req != NULL) {
                 if (strcmp(path, "") != 0 && strcmp(path, "pkix/") != 0) {
                     (void)http_server_send_status(cbio, 404, "Not Found");
-                    CMP_err1("Expecting empty path or 'pkix/' but got '%s'\n",
+                    CMP_err1("Expecting empty path or 'pkix/' but got '%s'",
                              path);
                     OPENSSL_free(path);
                     OSSL_CMP_MSG_free(req);
diff --git a/apps/cmp_mock_srv.c b/apps/cmp_mock_srv.c
index b45f98551c..c63e5f9943 100644
--- a/apps/cmp_mock_srv.c
+++ b/apps/cmp_mock_srv.c
@@ -208,6 +208,7 @@ static OSSL_CMP_PKISI *process_cert_request(OSSL_CMP_SRV_CTX *srv_ctx,
     }
     if (ctx->certOut != NULL
             && (*certOut = X509_dup(ctx->certOut)) == NULL)
+        /* TODO better return a cert produced from data in request template */
         goto err;
     if (ctx->chainOut != NULL
             && (*chainOut = X509_chain_up_ref(ctx->chainOut)) == NULL)