gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] [BUG] https functionality and port default


From: Bryan Nollett
Subject: [Gnu-arch-users] [BUG] https functionality and port default
Date: Wed, 28 Jul 2004 00:47:25 -0500 (CDT)
User-agent: SquirrelMail/1.4.0

This possible patch is a superset of Bug 83
  http://lists.gnu.org/archive/html/gnu-arch-users/2004-03/msg01239.html
  http://bugs.gnuarch.org/cgi-bin/bugreport.cgi?bug=83
and perhaps should have been grouped with #83.


--- orig/libarch/pfs-dav.c
+++ mod/libarch/pfs-dav.c
@@ -28,6 +28,7 @@
 #include "tla/libneon/ne_props.h"
 #include "tla/libneon/ne_uri.h"
 #include "tla/libneon/ne_redirect.h"
+#include "tla/libneon/ne_socket.h"

 ^L

@@ -146,6 +147,12 @@
   struct authinfo * auth = 0;
   int proxy_port_num;

+  /* ne_sock_init() is idempotent, so just init always */
+  if (ne_sock_init ())
+    {
+      panic ("arch_pfs_dav_connect: ne_sock_init() failed.");
+    }
+
   answer = (struct arch_pfs_dav_session *)lim_malloc (0, sizeof (*answer));
   mem_set0 ((t_uchar *)answer, sizeof (*answer));
   answer->pfs.vtable = &dav_pfs_fns;
@@ -202,7 +209,7 @@
    if (portstr)
      *(portstr++) = 0;

-  answer->dav_port = 80;
+  answer->dav_port = ne_uri_defaultport (answer->dav_scheme);
   if (portstr && (0 > cvt_decimal_to_uint (&ign, &answer->dav_port, portstr, 
str_length (portstr))))
     {
       safe_printfmt (2, "illegal port number in uri -- %s\n", uri);
@@ -212,6 +219,11 @@

   answer->sess = ne_session_create (answer->dav_scheme, answer->dav_hostname, 
answer->dav_port);

+  if (!str_cmp ("https", answer->dav_scheme))
+    {
+      ne_ssl_trust_default_ca (answer->sess);
+    }
+
   if (auth)
     {
       ne_set_server_auth (answer->sess, dav_client_auth, auth);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]