summary refs log tree commit diff stats
path: root/examples/ssl/pskclient.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-03 18:29:00 +0200
committerAraq <rumpf_a@web.de>2018-09-03 18:29:11 +0200
commit320582a55c9ba1f91d70a3f120413e305fda2962 (patch)
tree6114d47a5342adfd4d1f472bb3484a73ad11cf06 /examples/ssl/pskclient.nim
parent1a60ffcf1dc265c6b92dfd757e1bfd5e904c1f3d (diff)
downloadNim-320582a55c9ba1f91d70a3f120413e305fda2962.tar.gz
cleanup Nim's examples/ directory; closes #7725
Diffstat (limited to 'examples/ssl/pskclient.nim')
-rw-r--r--examples/ssl/pskclient.nim16
1 files changed, 0 insertions, 16 deletions
diff --git a/examples/ssl/pskclient.nim b/examples/ssl/pskclient.nim
deleted file mode 100644
index c83f27fbc..000000000
--- a/examples/ssl/pskclient.nim
+++ /dev/null
@@ -1,16 +0,0 @@
-# Create connection encrypted using preshared key (TLS-PSK).
-import net
-
-static: assert defined(ssl)
-
-let sock = newSocket()
-sock.connect("localhost", Port(8800))
-
-proc clientFunc(identityHint: string): tuple[identity: string, psk: string] =
-  echo "identity hint ", identityHint.repr
-  return ("foo", "psk-of-foo")
-
-let context = newContext(cipherList="PSK-AES256-CBC-SHA")
-context.clientGetPskFunc = clientFunc
-context.wrapConnectedSocket(sock, handshakeAsClient)
-context.destroyContext()