[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] openssl egg
From: |
Goetz Isenmann |
Subject: |
[Chicken-users] openssl egg |
Date: |
Wed, 23 May 2007 14:40:08 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi!
I try to create a https connection tunneling through a proxy.
Therefore I have to (1) create an unencrypted tcp connection to the
proxy, (2) tell the proxy to create a tunnel to the servers https
port (CONNECT host.domain:port HTTP/1.0), (3) wait for a positive
response (HTTP/1.0 200 Connection established), and (4) initiate a
SSL handshake over this already estabilshed connection.
Looks like the current openssl egg does not support this (step 4).
May I suggest a change? Something like:
--- openssl.scm 2006-10-18 07:48:10.000000000 +0200
+++ openssl2.scm 2007-05-23 14:20:39.614720373 +0200
@@ -4,6 +4,7 @@
(define-extension openssl
(export
ssl-connect
+ ssl-start
ssl-make-client-context
ssl-client-context?
ssl-listen
@@ -401,9 +402,12 @@
;; connect to SSL server
(define (ssl-connect hostname #!optional port (ctx 'sslv2-or-v3))
+ (let-values (((i o) (tcp-connect hostname port)))
+ (ssl-start i o ctx)))
+
+(define (ssl-start i o #!optional (ctx 'sslv2-or-v3))
(let* ((fd
- (call-with-values (cut tcp-connect hostname port)
- ##net#unwrap-tcp-ports))
+ (##net#unwrap-tcp-ports i o))
(ctx
(if (ssl-client-context? ctx)
(##ssl#unwrap-client-context ctx)
Beware: I have never done anything in scheme, I can only guess, what
that values, cut, and wrap business might do.
BTW: Does this #!optional port make sense? Isn't it a required argument?
--
Goetz Isenmann
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
- [Chicken-users] openssl egg,
Goetz Isenmann <=