24 lines
759 B
Bash
Executable File
24 lines
759 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "Test RSA key"
|
|
ssh-keygen -lf fixtures/pub-rsa-2048.ssh.pub | tee fingerprint.txt
|
|
node bin/ssh-fingerprint.js fixtures/pub-rsa-2048.ssh.pub > fingerprint.1.txt
|
|
diff fingerprint.txt fingerprint.1.txt
|
|
echo ""
|
|
|
|
echo "Test EC P-256 key"
|
|
ssh-keygen -lf fixtures/pub-ec-p256.ssh.pub | tee fingerprint.txt
|
|
node bin/ssh-fingerprint.js fixtures/pub-ec-p256.ssh.pub > fingerprint.1.txt
|
|
diff fingerprint.txt fingerprint.1.txt
|
|
echo ""
|
|
|
|
echo "Test EC P-384 key"
|
|
ssh-keygen -lf fixtures/pub-ec-p384.ssh.pub | tee fingerprint.txt
|
|
node bin/ssh-fingerprint.js fixtures/pub-ec-p384.ssh.pub > fingerprint.1.txt
|
|
diff fingerprint.txt fingerprint.1.txt
|
|
echo ""
|
|
|
|
echo "All Tests Passed"
|
|
echo "• generated fingerprints of fixtures match ssh-keygen output"
|