nss.sh 800 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. set -e
  3. set -x
  4. # Setup nss cert db
  5. mkdir nssdb
  6. ./dist/Debug/bin/certutil -d nssdb -N --empty-password
  7. ./dist/Debug/bin/certutil -d nssdb -A -a -i wolfssl/certs/test/server-localhost.pem \
  8. -t TCP -n 'wolf localhost'
  9. # App data for nss
  10. echo Hello from nss > /tmp/in
  11. # TLS 1.3 test
  12. env -C wolfssl ./examples/server/server -v 4 -p 4433 \
  13. -c certs/test/server-localhost.pem -d -w > /tmp/server.log 2>&1 &
  14. sleep 0.1
  15. ./dist/Debug/bin/tstclnt -V tls1.3: -h localhost -p 4433 -d nssdb -C -4 -A /tmp/in -v
  16. sleep 0.1
  17. # DTLS 1.3 test
  18. env -C wolfssl ./examples/server/server -v 4 -p 4433 -u \
  19. -c certs/test/server-localhost.pem -d -w > /tmp/server.log 2>&1 &
  20. sleep 0.1
  21. ./dist/Debug/bin/tstclnt -V tls1.3: -P client -h localhost -p 4433 -d nssdb -C -4 -A /tmp/in -v
  22. sleep 0.1