Initial support for certificate purpose checking: this will
[openssl.git] / ssl / ssl_cert.c
index b33658f017b1e21862c33e08abb6a3162dfbf5f2..a695d042cf2e9f8e15ced5b840a4901fe69e905e 100644 (file)
  */
 
 #include <stdio.h>
-#include <sys/types.h>
-#if !defined(WIN32) && !defined(VSM) && !defined(NeXT)
+
+#include "openssl/e_os.h"
+
+#ifndef NO_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if !defined(WIN32) && !defined(VSM) && !defined(NeXT) && !defined(MAC_OS_pre_X)
 #include <dirent.h>
 #endif
+
 #ifdef NeXT
 #include <sys/dir.h>
 #define dirent direct
 #endif
+
 #include <openssl/objects.h>
 #include <openssl/bio.h>
 #include <openssl/pem.h>
@@ -426,7 +434,7 @@ int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk)
                (char *)s);
 
        if (s->ctx->app_verify_callback != NULL)
-               i=s->ctx->app_verify_callback(&ctx);
+               i=s->ctx->app_verify_callback(&ctx); /* should pass app_verify_arg */
        else
                {
 #ifndef NO_X509_VERIFY
@@ -671,6 +679,7 @@ err:
 
 #ifndef WIN32
 #ifndef VMS                    /* XXXX This may be fixed in the future */
+#ifndef MAC_OS_pre_X
 
 int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
                                       const char *dir)
@@ -714,3 +723,4 @@ err:
 
 #endif
 #endif
+#endif