Skip to content

Commit 7eada8c

Browse files
committed
Re-order PEM headers to prepare for X.509 APIs
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 36e8935 commit 7eada8c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/misc/pem/pem.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
#ifdef LTC_PEM
1111

1212
const struct pem_header_id pem_std_headers[] = {
13+
{
14+
/* X.509 Certificates */
15+
SET_CSTR(.start, "-----BEGIN CERTIFICATE-----"),
16+
SET_CSTR(.end, "-----END CERTIFICATE-----"),
17+
.has_more_headers = no,
18+
.flags = pf_x509,
19+
},
1320
{
1421
/* PKCS#8 encrypted */
1522
SET_CSTR(.start, "-----BEGIN ENCRYPTED PRIVATE KEY-----"),
@@ -24,13 +31,6 @@ const struct pem_header_id pem_std_headers[] = {
2431
.has_more_headers = no,
2532
.flags = pf_pkcs8,
2633
},
27-
{
28-
/* X.509 Certificates */
29-
SET_CSTR(.start, "-----BEGIN CERTIFICATE-----"),
30-
SET_CSTR(.end, "-----END CERTIFICATE-----"),
31-
.has_more_headers = no,
32-
.flags = pf_x509,
33-
},
3434
{
3535
/* Regular (plain) public keys */
3636
SET_CSTR(.start, "-----BEGIN PUBLIC KEY-----"),

0 commit comments

Comments
 (0)