Browse code

Added a warning that the PolarSSL library does not support pkcs12 files.

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>

Adriaan de Jong authored on 2011/07/05 17:02:40
Showing 3 changed files
... ...
@@ -4041,6 +4041,7 @@ This option can be used instead of
4041 4041
 .B \-\-ca, \-\-cert,
4042 4042
 and
4043 4043
 .B \-\-key.
4044
+Not available with PolarSSL.
4044 4045
 .\"*********************************************************
4045 4046
 .TP
4046 4047
 .B \-\-verify-hash hash
... ...
@@ -2265,12 +2265,16 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
2265 2265
 #endif
2266 2266
       if (options->pkcs12_file)
2267 2267
         {
2268
+#ifdef USE_POLARSSL
2269
+	  msg(M_USAGE, "Parameter --pkcs12 cannot be used with the PolarSSL version version of OpenVPN.");
2270
+#else
2268 2271
           if (options->ca_path)
2269 2272
 	    msg(M_USAGE, "Parameter --capath cannot be used when --pkcs12 is also specified.");
2270 2273
           if (options->cert_file)
2271 2274
 	    msg(M_USAGE, "Parameter --cert cannot be used when --pkcs12 is also specified.");
2272 2275
           if (options->priv_key_file)
2273 2276
 	    msg(M_USAGE, "Parameter --key cannot be used when --pkcs12 is also specified.");
2277
+#endif
2274 2278
         }
2275 2279
       else
2276 2280
         {
... ...
@@ -220,6 +220,7 @@ tls_ctx_load_pkcs12(struct tls_root_ctx *ctx, const char *pkcs12_file,
220 220
     )
221 221
 {
222 222
   msg(M_FATAL, "PKCS #12 files not yet supported for PolarSSL.");
223
+  return 0;
223 224
 }
224 225
 
225 226
 #ifdef WIN32