added component BUILD_FROM_FILE
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 25 Mar 2008 13:26:33 +0000 (13:26 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 25 Mar 2008 13:26:33 +0000 (13:26 -0000)
src/libstrongswan/credentials/builder.c
src/libstrongswan/credentials/builder.h
src/libstrongswan/credentials/credential_factory.c

index f2f5434..6a03cbd 100644 (file)
@@ -16,6 +16,7 @@
 #include "builder.h"
 
 ENUM(builder_part_names, BUILD_BLOB_ASN1_DER, BUILD_END,
+       "BUILD_FROM_FILE",
        "BUILD_BLOB_ASN1_DER",
        "BUILD_KEY_SIZE",
        "BUILD_SIGNING_KEY",
index a0a462e..54aca33 100644 (file)
@@ -38,9 +38,11 @@ typedef builder_t* (*builder_constructor_t)(int subtype);
  * Parts to build credentials from.
  */
 enum builder_part_t {
-       /** DER encoded ASN1 blob, argument is a chunk_t */
+       /** path to a file containing an ASN1 blob, char* */
+       BUILD_FROM_FILE,
+       /** DER encoded ASN1 blob, chunk_t */
        BUILD_BLOB_ASN1_DER,
-       /** key size in bits, as used for key generation, as u_int */
+       /** key size in bits, as used for key generation, u_int */
        BUILD_KEY_SIZE,
        /** private key to use for signing, private_key_t* */
        BUILD_SIGNING_KEY,
index c515fd1..5a421ee 100644 (file)
@@ -159,6 +159,7 @@ static void* create(private_credential_factory_t *this, credential_type_t type,
                                case BUILD_NOT_AFTER_TIME:
                                        builder->add(builder, part, va_arg(args, time_t));
                                        continue;
+                               case BUILD_FROM_FILE:
                                case BUILD_SIGNING_KEY:
                                case BUILD_PUBLIC_KEY:
                                case BUILD_SUBJECT: