Add a test for the certificate callback
[openssl.git] / test / v3nametest.c
index 0d55f81ba3d360e753faf12dc74408a91582fc7f..86f3829aedbd8f3b23bd6b7e8c8d3c90321a51dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2012-2018 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -7,13 +7,18 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "../e_os.h"
 #include <string.h>
-#include "internal/nelem.h"
+
+#include <openssl/e_os2.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
+#include "internal/nelem.h"
 #include "testutil.h"
 
+#ifdef OPENSSL_SYS_WINDOWS
+# define strcasecmp _stricmp
+#endif
+
 static const char *const names[] = {
     "a", "b", ".", "*", "@",
     ".a", "a.", ".b", "b.", ".*", "*.", "*@", "@*", "a@", "@a", "b@", "..",
@@ -246,7 +251,7 @@ static const struct set_name_fn name_fns[] = {
     {set_altname_email, "set rfc822Name", 0, 1},
 };
 
-static X509 *make_cert()
+static X509 *make_cert(void)
 {
     X509 *crt = NULL;