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

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