Commit 7e831342fb for strongswan.org

commit 7e831342fbf2ee748c829b80668e9199fcbf0c55
Author: Tobias Brunner <tobias@strongswan.org>
Date:   Mon Sep 14 12:16:55 2026 +0200

    container: Add new type for PEM-encoded certificate bundles

diff --git a/src/libstrongswan/Makefile.am b/src/libstrongswan/Makefile.am
index 3687135fa0..f2c5704328 100644
--- a/src/libstrongswan/Makefile.am
+++ b/src/libstrongswan/Makefile.am
@@ -103,7 +103,7 @@ credentials/certificates/ocsp_response.h \
 credentials/certificates/pgp_certificate.h \
 credentials/certificates/certificate_printer.h \
 credentials/containers/container.h credentials/containers/pkcs7.h \
-credentials/containers/pkcs12.h \
+credentials/containers/pkcs12.h credentials/containers/pem.h \
 credentials/credential_manager.h credentials/ocsp_responders.h \
 credentials/ocsp_responder.h \
 credentials/sets/auth_cfg_wrapper.h credentials/sets/ocsp_response_wrapper.h \
diff --git a/src/libstrongswan/credentials/containers/container.c b/src/libstrongswan/credentials/containers/container.c
index c227a44880..751b5e5274 100644
--- a/src/libstrongswan/credentials/containers/container.c
+++ b/src/libstrongswan/credentials/containers/container.c
@@ -16,11 +16,12 @@

 #include "container.h"

-ENUM(container_type_names, CONTAINER_PKCS7, CONTAINER_PKCS12,
+ENUM(container_type_names, CONTAINER_PKCS7, CONTAINER_PEM,
 	"PKCS7",
 	"PKCS7_DATA",
 	"PKCS7_SIGNED_DATA",
 	"PKCS7_ENVELOPED_DATA",
 	"PKCS7_ENCRYPTED_DATA",
 	"PKCS12",
+	"PEM",
 );
diff --git a/src/libstrongswan/credentials/containers/container.h b/src/libstrongswan/credentials/containers/container.h
index 0f36548d21..127548b371 100644
--- a/src/libstrongswan/credentials/containers/container.h
+++ b/src/libstrongswan/credentials/containers/container.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Tobias Brunner
+ * Copyright (C) 2013-2026 Tobias Brunner
  * Copyright (C) 2012 Martin Willi
  *
  * Copyright (C) secunet Security Networks AG
@@ -45,6 +45,8 @@ enum container_type_t {
 	CONTAINER_PKCS7_ENCRYPTED_DATA,
 	/** A PKCS#12 container */
 	CONTAINER_PKCS12,
+	/** A bundle of PEM encoded certificates */
+	CONTAINER_PEM,
 };

 /**
diff --git a/src/libstrongswan/credentials/containers/pem.h b/src/libstrongswan/credentials/containers/pem.h
new file mode 100644
index 0000000000..cf822ee260
--- /dev/null
+++ b/src/libstrongswan/credentials/containers/pem.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2026 Tobias Brunner
+ *
+ * Copyright (C) secunet Security Networks AG
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ */
+
+/**
+ * @defgroup pem pem
+ * @{ @ingroup containers
+ */
+
+#ifndef PEM_H_
+#define PEM_H_
+
+#include <credentials/containers/container.h>
+
+typedef struct pem_t pem_t;
+
+/**
+ * PEM certificate bundle container type.
+ */
+struct pem_t {
+
+	/**
+	 * Implements container_t.
+	 */
+	container_t container;
+
+	/**
+	 * Create an enumerator over contained certificates.
+	 *
+	 * @return			enumerator over certificate_t
+	 */
+	enumerator_t *(*create_cert_enumerator)(pem_t *this);
+};
+
+#endif /** PEM_H_ @}*/