Fix standalone bio_test and v3name_test on Win64.

Win32 still has assembly issues and bssl wants to select() on both sockets and
stdin (doesn't work on Windows). But this is a start.

Change-Id: Iafc5215be281aed836c5ac2dc8b379399848a2c2
Reviewed-on: https://boringssl-review.googlesource.com/2090
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2014-10-29 16:07:12 -04:00 committed by Adam Langley
parent 5f51c25303
commit 2a0f3420f7
2 changed files with 5 additions and 2 deletions

View File

@ -26,3 +26,6 @@ add_executable(
) )
target_link_libraries(bio_test crypto) target_link_libraries(bio_test crypto)
if (WIN32)
target_link_libraries(bio_test ws2_32)
endif()

View File

@ -53,9 +53,9 @@
* Hudson (tjh@cryptsoft.com). */ * Hudson (tjh@cryptsoft.com). */
#include <string.h> #include <string.h>
#include <strings.h>
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/mem.h>
#include <openssl/x509.h> #include <openssl/x509.h>
#include <openssl/x509v3.h> #include <openssl/x509v3.h>
@ -326,7 +326,7 @@ static void run_cert(X509 *crt, const char *nameincert,
const char *const *pname = names; const char *const *pname = names;
while (*pname) while (*pname)
{ {
int samename = strcasecmp(nameincert, *pname) == 0; int samename = OPENSSL_strcasecmp(nameincert, *pname) == 0;
size_t namelen = strlen(*pname); size_t namelen = strlen(*pname);
char *name = malloc(namelen); char *name = malloc(namelen);
int match, ret; int match, ret;