diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-08-31 12:54:43 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-08-31 12:55:04 +0100 |
commit | bb1e87ce4d3e3e81e65609354667e5ed860f02c8 (patch) | |
tree | 7a457d72e48c330d33672690772d157d041f866d /lib/pure/net.nim | |
parent | d26d42b88e2abacb74cd3bfedf7b9a0d8d0a7eee (diff) | |
download | Nim-bb1e87ce4d3e3e81e65609354667e5ed860f02c8.tar.gz |
Async SSL support.
Diffstat (limited to 'lib/pure/net.nim')
-rw-r--r-- | lib/pure/net.nim | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim index fd485340c..5f202f05c 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -22,17 +22,17 @@ when defined(ssl): when defined(ssl): type - SSLError* = object of Exception + SslError* = object of Exception - SSLCVerifyMode* = enum + SslCVerifyMode* = enum CVerifyNone, CVerifyPeer - SSLProtVersion* = enum + SslProtVersion* = enum protSSLv2, protSSLv3, protTLSv1, protSSLv23 - SSLContext* = distinct PSSLCTX + SslContext* = distinct SslCtx - SSLAcceptResult* = enum + SslAcceptResult* = enum AcceptNoClient = 0, AcceptNoHandshake, AcceptSuccess {.deprecated: [ESSL: SSLError, TSSLCVerifyMode: SSLCVerifyMode, @@ -125,7 +125,8 @@ when defined(ssl): ErrLoadBioStrings() OpenSSL_add_all_algorithms() - proc raiseSSLError(s = "") = + proc raiseSSLError*(s = "") = + ## Raises a new SSL error. if s != "": raise newException(SSLError, s) let err = ErrPeekLastError() @@ -161,7 +162,7 @@ when defined(ssl): certFile = "", keyFile = ""): PSSLContext = ## Creates an SSL context. ## - ## Protocol version specifies the protocol to use. SSLv2, SSLv3, TLSv1 are + ## Protocol version specifies the protocol to use. SSLv2, SSLv3, TLSv1 ## are available with the addition of ``protSSLv23`` which allows for ## compatibility with all of them. ## |