Module ssl

This module provides an easy to use sockets-style nim interface to the OpenSSL library.

Types

TSecureSocket = object 
  ssl: SslPtr
  bio: BIO
  Source

Procs

proc connect(sock: var TSecureSocket; address: string; port: int): int {.
    raises: [OSError], tags: [].}
Connects to the specified address on the specified port. Returns the result of the certificate validation.   Source
proc recvLine(sock: TSecureSocket; line: var TaintedString): bool {.raises: [], 
    tags: [].}
Acts in a similar fashion to the recvLine in the sockets module. Returns false when no data is available to be read. Line must be initialized and not nil!   Source
proc send(sock: TSecureSocket; data: string) {.raises: [OSError], tags: [].}
Writes data to the socket.   Source
proc close(sock: TSecureSocket) {.raises: [OSError], tags: [].}
Closes the socket   Source