net.nim: destroyContext for destroying SSLContext

This commit is contained in:
Michał Zieliński 2015-10-24 22:48:33 +02:00
commit 3ecf33fa6a
2 changed files with 8 additions and 1 deletions

View file

@ -13,3 +13,4 @@ proc clientFunc(identityHint: string): tuple[identity: string, psk: string] =
let context = newContext(cipherList="PSK-AES256-CBC-SHA")
context.clientGetPskFunc = clientFunc
context.wrapConnectedSocket(sock, handshakeAsClient)
context.destroyContext()