--- src/ssl.c
+++ src/ssl.c
@@ -83,9 +83,13 @@
 static void initTestCert()
 {
 	int rc;
+#ifdef POLARSSL_CERTS_C
 	builtInTestCertificate = true;
 	rc = x509parse_crt(&certificate, (unsigned char *)test_srv_crt,
 					   strlen(test_srv_crt));	
+#else
+	rc = -1;
+#endif
 	if (rc != 0)
 		Log_fatal("Could not parse built-in test certificate");
 }
@@ -93,9 +97,12 @@
 static void initTestKey()
 {
 	int rc;
-	
+#ifdef POLARSSL_CERTS_C
 	rc = x509parse_key(&key, (unsigned char *)test_srv_key,
 					   strlen(test_srv_key), NULL, 0);
+#else
+	rc = -1;
+#endif
 	if (rc != 0)
 		Log_fatal("Could not parse built-in test RSA key");
 }
