(rfc tls) now doesn't compute MAC (or master secret) properly

Create issue
Issue #63 resolved
Takashi Kato repo owner created an issue

This should print 'Hello' but raises an error.

(import (rnrs) (sagittarius threads) (rfc tls) (rfc x.509) (crypto) (srfi :19))

(define keypair (generate-key-pair RSA :size 1024))

(define cert (make-x509-basic-certificate keypair 1
                      (make-x509-issuer '((C . "NL")))
                      (make-validity (current-date)
                             (current-date))
                      (make-x509-issuer '((C . "NL")))))


(define server (make-server-tls-socket "5000" (list cert)))
(define server-thread
  (let ((t (make-thread (lambda ()
              (let ((s (tls-socket-accept server)))
                (print s)
                (tls-socket-send s (string->utf8 "hello")))))))
    (thread-start! t))
  (thread-sleep! 2))
(print server)

(let ((client (make-client-tls-socket "localhost" "5000")))
  (print client)
  (print (utf8->string (tls-socket-recv client 50))))

(thread-join! server-thread)

Comments (1)

  1. Log in to comment