Avoid including cryptlib.h, it's not really needed.
[openssl.git] / ssl / ssltest.c
index 82c3b8d89c6b7060e96fe749af7559df6e0b36e5..63641df6c3d20113bf9a5c21079143c4e7323173 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include <inttypes.h>
 
 #define USE_SOCKETS
 #include "e_os.h"
 #elif defined(OPENSSL_SYS_WINCE)
 #  define TEST_SERVER_CERT "\\OpenSSL\\server.pem"
 #  define TEST_CLIENT_CERT "\\OpenSSL\\client.pem"
+#elif defined(OPENSSL_SYS_NETWARE)
+#  define TEST_SERVER_CERT "\\openssl\\apps\\server.pem"
+#  define TEST_CLIENT_CERT "\\openssl\\apps\\client.pem"
 #else
 #  define TEST_SERVER_CERT "../apps/server.pem"
 #  define TEST_CLIENT_CERT "../apps/client.pem"
@@ -1350,8 +1354,8 @@ int doit(SSL *s_ssl, SSL *c_ssl, long count)
                        {
                        if (c_write)
                                {
-                               j=(cw_num > (long)sizeof(cbuf))
-                                       ?sizeof(cbuf):(int)cw_num;
+                               j = (cw_num > (long)sizeof(cbuf)) ?
+                                       (int)sizeof(cbuf) : (int)cw_num;
                                i=BIO_write(c_bio,cbuf,j);
                                if (i < 0)
                                        {
@@ -1481,8 +1485,8 @@ int doit(SSL *s_ssl, SSL *c_ssl, long count)
                                }
                        else
                                {
-                               j=(sw_num > (long)sizeof(sbuf))?
-                                       sizeof(sbuf):(int)sw_num;
+                               j = (sw_num > (long)sizeof(sbuf)) ?
+                                       (int)sizeof(sbuf) : (int)sw_num;
                                i=BIO_write(s_bio,sbuf,j);
                                if (i < 0)
                                        {
@@ -1590,7 +1594,7 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg)
        fprintf(stderr, "In app_verify_callback, allowing cert. ");
        fprintf(stderr, "Arg is: %s\n", (char *)arg);
        fprintf(stderr, "Finished printing do we have a context? 0x%x a cert? 0x%x\n",
-                       (unsigned int)ctx, (unsigned int)ctx->cert);
+                       (uintptr_t)ctx, (uintptr_t)ctx->cert);
        if (ctx->cert)
                s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256);
        if (s != NULL)