+
+ /*
+ * PolarSSL 0.11 - 0.12,1 has a bug; it ignores the last certificate in the chain.
+ * Read the certificate again so that it gets last in chain. Later releases like 0.14.0 works
+ * fine with the extra certificate, so I don't see any harm in doing so.
+ */
+ rc = x509parse_crtfile(&certificate, crtfile);
+ if (rc != 0)
+ Log_fatal("Could not read certificate file %s", crtfile);
+