JuliaWeb / GnuTLS.jl

Transport Level Security for Julia Streams provided by GnuTLS
Other
8 stars 13 forks source link

GnuTLS.jl

Add transport layer security (TLS) to any Julia Stream

Build Status Coverage Status

GnuTLS GnuTLS

Installation: Pkg.add("GnuTLS")

API

GnuTLS.jl can add TLS support to any transport layer implementing the Julia IOinterface (e.g. IOStream, TcpSocket, NamedPipe, TTY, ...)

The following functions are currently provided:

Usage

The following code snippet demonstrates how the GnuTLS.jl package may be used to query an HTTPS resource:

using GnuTLS
sess = GnuTLS.Session()
set_priority_string!(sess)
set_credentials!(sess,GnuTLS.CertificateStore())
associate_stream(sess,connect("github.com",443))
handshake!(sess)
write(sess,"GET / HTTP/1.1\r\n\r\n")
print(readall(sess))