Created
August 30, 2018 19:12
-
-
Save phoe/97dea60b07e33552b055c83e782b55ad to your computer and use it in GitHub Desktop.
Connect to Furcadia with STARTTLS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun ssl-connect () ;; this is a god damn hack | |
(let* ((socket (usocket:socket-connect "lightbringer.furcadia.com" 80)) | |
(stream (usocket:socket-stream socket))) | |
(sleep 1) | |
(loop while (listen stream) | |
for line = (read-line stream nil stream) | |
until (eq line stream) | |
do (format t "S> ~A~%" line)) | |
(format t "C> ~A~%" "starttls") | |
(format stream "starttls~C~C" #\Return #\Linefeed) | |
(force-output stream) | |
(format t "S> ~A~%" (read-line stream)) | |
(cl+ssl:make-ssl-client-stream stream | |
:verify nil ;; until we find the X509 public cert | |
))) |
Author
phoe
commented
Aug 30, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment