Changeset 34321 in project


Ignore:
Timestamp:
08/22/17 01:46:19 (3 months ago)
Author:
chust
Message:

[openssl] use address-info to determine whether to send SNI extension

Location:
release/4/openssl/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/openssl/trunk/openssl.meta

    r23255 r34321  
    77 (category net)
    88 (doc-from-wiki)
     9 (needs address-info)
    910 (files "openssl.scm" "openssl.release-info" "openssl.meta" "openssl.setup"))
  • release/4/openssl/trunk/openssl.scm

    r34313 r34321  
    4848   ##sys#check-string))
    4949
    50 (use srfi-13 irregex srfi-18 tcp)
     50(use srfi-13 srfi-18 tcp)
    5151
    5252(import
    5353 (only data-structures ->string)
    54  (only files make-pathname))
     54 (only files make-pathname)
     55 (only address-info address-infos))
    5556
    5657(require-library
    57  data-structures)
     58 data-structures address-info)
    5859
    5960#>
     
    561562(define ssl-set-connect-state! (foreign-lambda void "SSL_set_connect_state" c-pointer))
    562563
    563 (define ip-regex
    564   (sre->irregex
    565     '(or
    566        (seq (= 3 (** 1 3 digit) #\.) (** 1 3 digit))
    567        (seq (+ (* hex-digit) #\:) (+ hex-digit)))))
     564(define (symbolic-host? host port)
     565  (not (address-infos host #:port port #:type 'tcp #:server? #f #:numeric? #t)))
    568566
    569567;; connect to SSL server
     
    579577      (lambda ()
    580578        (when (eq? sni-name #t)
    581           (set! sni-name (and (not (irregex-match? ip-regex hostname)) hostname)))
     579          (set! sni-name (and (symbolic-host? hostname port) hostname)))
    582580        (when sni-name
    583581          (ssl-set-tlsext-hostname! ssl sni-name))
  • release/4/openssl/trunk/openssl.setup

    r34313 r34321  
    1919  'openssl
    2020  '("openssl.scm" "openssl.so" "openssl.import.so" "openssl-static.o")
    21   '((version "1.9.1")
     21  '((version "1.9.2")
    2222    (static "openssl-static.o")
    2323    (static-options "-lssl -lcrypto -lgdi32")))
Note: See TracChangeset for help on using the changeset viewer.