summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/pem/pem_encoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/pem/pem_encoder.c')
-rw-r--r--src/libstrongswan/plugins/pem/pem_encoder.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/libstrongswan/plugins/pem/pem_encoder.c b/src/libstrongswan/plugins/pem/pem_encoder.c
index 35ea3e885..76b0b7b40 100644
--- a/src/libstrongswan/plugins/pem/pem_encoder.c
+++ b/src/libstrongswan/plugins/pem/pem_encoder.c
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2010 Andreas Steffen
- * Hochschule fuer Technik Rapperswil
+ * Copyright (C) 2010-2016 Andreas Steffen
+ * HSR Hochschule fuer Technik Rapperswil
*
* 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
@@ -37,7 +37,11 @@ bool pem_encoder_encode(cred_encoding_type_t type, chunk_t *encoding,
if (cred_encoding_args(args, CRED_PART_RSA_PUB_ASN1_DER,
&asn1, CRED_PART_END) ||
cred_encoding_args(args, CRED_PART_ECDSA_PUB_ASN1_DER,
- &asn1, CRED_PART_END))
+ &asn1, CRED_PART_END) ||
+ cred_encoding_args(args, CRED_PART_EDDSA_PUB_ASN1_DER,
+ &asn1, CRED_PART_END) ||
+ cred_encoding_args(args, CRED_PART_BLISS_PUB_ASN1_DER,
+ &asn1, CRED_PART_END))
{
break;
}
@@ -53,11 +57,6 @@ bool pem_encoder_encode(cred_encoding_type_t type, chunk_t *encoding,
break;
}
}
- if (cred_encoding_args(args, CRED_PART_BLISS_PUB_ASN1_DER,
- &asn1, CRED_PART_END))
- {
- break;
- }
return FALSE;
case PRIVKEY_PEM:
label ="RSA PRIVATE KEY";
@@ -97,6 +96,12 @@ bool pem_encoder_encode(cred_encoding_type_t type, chunk_t *encoding,
label ="BLISS PRIVATE KEY";
break;
}
+ if (cred_encoding_args(args, CRED_PART_EDDSA_PRIV_ASN1_DER,
+ &asn1, CRED_PART_END))
+ {
+ label ="PRIVATE KEY";
+ break;
+ }
return FALSE;
case CERT_PEM:
if (cred_encoding_args(args, CRED_PART_X509_ASN1_DER,