Blame SOURCES/0045-Include-message-CA-IDENT-with-GetCACaps-and-GetCACer.patch

8bf71a
From b63be96fd30d0a9fb2538e41509e8813620d5107 Mon Sep 17 00:00:00 2001
8bf71a
From: Rob Crittenden <rcritten@redhat.com>
8bf71a
Date: Fri, 22 May 2020 12:58:44 -0400
8bf71a
Subject: [PATCH] Include &message=CA-IDENT with GetCACaps and GetCACert
8bf71a
 requests
8bf71a
8bf71a
The guttman spec is quite unclear on this and in the GetCACaps
8bf71a
section doesn't mention &message at all. It only appears in the
8bf71a
generic GET requests section 4.1
8bf71a
8bf71a
The nourse spec is clearer and requires &message=CA-IDENT on
8bf71a
GetCACaps requests.
8bf71a
8bf71a
AD 2012 R2 servers also require message on GetCACert requests.
8bf71a
8bf71a
This reverts much of 60a4db5796b0575ca2cc9f1af4ecb3fdc6359242
8bf71a
8bf71a
https://bugzilla.redhat.com/show_bug.cgi?id=1839181
8bf71a
https://pagure.io/certmonger/issue/103
8bf71a
---
8bf71a
 src/scep.c | 8 ++++----
8bf71a
 1 file changed, 4 insertions(+), 4 deletions(-)
8bf71a
8bf71a
diff --git a/src/scep.c b/src/scep.c
8bf71a
index 4dde1ce..11ebd6f 100644
8bf71a
--- a/src/scep.c
8bf71a
+++ b/src/scep.c
8bf71a
@@ -370,11 +370,11 @@ main(int argc, const char **argv)
8bf71a
 		break;
8bf71a
 	case op_get_ca_caps:
8bf71a
 		/* Only step: read capabilities for the daemon. */
8bf71a
-		params = talloc_asprintf(ctx, "operation=" OP_GET_CA_CAPS);
8bf71a
+		params = talloc_asprintf(ctx, "operation=" OP_GET_CA_CAPS "&message=%s", id);
8bf71a
 		break;
8bf71a
 	case op_get_ca_certs:
8bf71a
 		/* First step: get the root certificate. */
8bf71a
-		params = talloc_asprintf(ctx, "operation=" OP_GET_CA_CERT);
8bf71a
+		params = talloc_asprintf(ctx, "operation=" OP_GET_CA_CERT "&message=%s", id);
8bf71a
 		break;
8bf71a
 	case op_get_cert_initial:
8bf71a
 		if ((racert == NULL) || (strlen(racert) == 0)) {
8bf71a
@@ -393,7 +393,7 @@ main(int argc, const char **argv)
8bf71a
 				goto done;
8bf71a
 			}
8bf71a
 			/* First step: read capabilities for our use. */
8bf71a
-			params = talloc_asprintf(ctx, "operation=" OP_GET_CA_CAPS);
8bf71a
+			params = talloc_asprintf(ctx, "operation=" OP_GET_CA_CAPS "&message=%s", id);
8bf71a
 		}
8bf71a
 		break;
8bf71a
 	case op_pkcsreq:
8bf71a
@@ -413,7 +413,7 @@ main(int argc, const char **argv)
8bf71a
 				goto done;
8bf71a
 			}
8bf71a
 			/* First step: read capabilities for our use. */
8bf71a
-			params = talloc_asprintf(ctx, "operation=" OP_GET_CA_CAPS);
8bf71a
+			params = talloc_asprintf(ctx, "operation=" OP_GET_CA_CAPS "&message=%s", id);
8bf71a
 		}
8bf71a
 		break;
8bf71a
 	}
8bf71a
-- 
8bf71a
2.25.4
8bf71a