summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-06-16 01:35:52 +0000
committerJeremy Allison <jra@samba.org>1998-06-16 01:35:52 +0000
commitcb757820f5452d192ce3b1eeb4f19a17ee93c3fe (patch)
treeb40303dac4805a9ffb4a32e0f24d90648ed7a1e7 /source3/client
parente31b4f29f6b6b7f74a066e1219d85d1eb425eebb (diff)
downloadsamba-cb757820f5452d192ce3b1eeb4f19a17ee93c3fe.tar.gz
samba-cb757820f5452d192ce3b1eeb4f19a17ee93c3fe.tar.bz2
samba-cb757820f5452d192ce3b1eeb4f19a17ee93c3fe.zip
Added SSL support from Christian Starkjohann <cs@obdev.at>
This patch may not yet compile with -DUSE_SSL enabled, further Makefile changes may be needed. But it was important to get this code in place before I go off to USENIX. Jeremy. (This used to be commit 31e768369fdc61e07c59630c86c62239f3d3f3f7)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c4
-rw-r--r--source3/client/clientutil.c13
2 files changed, 17 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index c48c5500cd..bdfa29f86b 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3588,6 +3588,10 @@ static void usage(char *pname)
interpret_coding_system(term_code);
+#ifdef USE_SSL
+ sslutil_init(0);
+#endif
+
pstrcpy(workgroup,lp_workgroup());
load_interfaces();
diff --git a/source3/client/clientutil.c b/source3/client/clientutil.c
index 0c60ac0109..e63f668481 100644
--- a/source3/client/clientutil.c
+++ b/source3/client/clientutil.c
@@ -338,6 +338,10 @@ BOOL cli_send_session_request(char *inbuf,char *outbuf)
_smb_setlen(outbuf,len);
CVAL(outbuf,0) = 0x81;
+#ifdef USE_SSL
+retry:
+#endif /* USE_SSL */
+
send_smb(Client,outbuf);
DEBUG(5,("Sent session request\n"));
@@ -373,6 +377,15 @@ BOOL cli_send_session_request(char *inbuf,char *outbuf)
return cli_send_session_request(inbuf,outbuf);
} /* C. Hoch 9/14/95 End */
+#ifdef USE_SSL
+ if(CVAL(inbuf,0) == 0x83 && CVAL(inbuf,4) == 0x8e) { /* use ssl */
+ fprintf(stderr, "Making secure connection\n");
+ if(!sslutil_fd_is_ssl(Client)){
+ if(sslutil_connect(Client) == 0)
+ goto retry;
+ }
+ }
+#endif
if (CVAL(inbuf,0) != 0x82)
{