updated for fc8, dynamic linking
Scott Baker [Thu, 13 Nov 2008 21:07:50 +0000 (21:07 +0000)]
24 files changed:
keyconvert/Makefile
keyconvert/keyconvert.c
keyconvert/keyconvertmain.c
keyconvert/test.sh [new file with mode: 0755]
keyconvert/test.txt [new file with mode: 0644]
keyconvert/test/openssh_dsa_1024 [new file with mode: 0644]
keyconvert/test/openssh_dsa_1024.pub [new file with mode: 0644]
keyconvert/test/openssh_dsa_2048 [new file with mode: 0644]
keyconvert/test/openssh_dsa_2048.pub [new file with mode: 0644]
keyconvert/test/openssh_dsa_512 [new file with mode: 0644]
keyconvert/test/openssh_dsa_512.pub [new file with mode: 0644]
keyconvert/test/openssh_rsa1_1024 [new file with mode: 0644]
keyconvert/test/openssh_rsa1_1024.pub [new file with mode: 0644]
keyconvert/test/openssh_rsa1_2048 [new file with mode: 0644]
keyconvert/test/openssh_rsa1_2048.pub [new file with mode: 0644]
keyconvert/test/openssh_rsa1_512 [new file with mode: 0644]
keyconvert/test/openssh_rsa1_512.pub [new file with mode: 0644]
keyconvert/test/openssh_rsa_1024 [new file with mode: 0644]
keyconvert/test/openssh_rsa_1024.pub [new file with mode: 0644]
keyconvert/test/openssh_rsa_2048 [new file with mode: 0644]
keyconvert/test/openssh_rsa_2048.pub [new file with mode: 0644]
keyconvert/test/openssh_rsa_512 [new file with mode: 0644]
keyconvert/test/openssh_rsa_512.pub [new file with mode: 0644]
keyconvert/testkey.sh [new file with mode: 0755]

index eda3f9b..917831e 100644 (file)
@@ -1,5 +1,5 @@
 keyconvert:
-       gcc -o keyconvert keyconvert.c keyconvertmain.c b64decode.c /usr/lib/libcrypto.a
+       gcc -o keyconvert -lcrypto -ldl keyconvert.c keyconvertmain.c b64decode.c
 
 clean:
        rm -rf keyconvert
index b2fdfd1..55dd79c 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdlib.h>
+#include <string.h>
 #include <openssl/bn.h>
 #include <openssl/rsa.h>
 #include <openssl/dsa.h>
index d59dba8..6332295 100644 (file)
@@ -1,4 +1,6 @@
+#include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include "keyconvert.h"
 #include "b64decode.h"
 
diff --git a/keyconvert/test.sh b/keyconvert/test.sh
new file mode 100755 (executable)
index 0000000..34fc7c2
--- /dev/null
@@ -0,0 +1,33 @@
+# this scripts tests the key conversion routines
+# it converts the _pub files in test/ from openssh to openssl
+# it then verifies signatures with openssl (see keytest.sh)
+
+rm -rf testout
+mkdir testout
+
+# rsa1 keys
+# these are in a different format
+#./keyconvert test/openssh_rsa1_512.pub testout/openssl_rsa1_512.pem
+#./keyconvert test/openssh_rsa1_1024.pub testout/openssl_rsa1_1024.pem
+#./keyconvert test/openssh_rsa1_2048.pub testout/openssl_rsa1_2048.pem
+
+# rsa2 keys
+./keyconvert test/openssh_rsa_512.pub testout/openssl_rsa_512.pem
+./keyconvert test/openssh_rsa_1024.pub testout/openssl_rsa_1024.pem
+./keyconvert test/openssh_rsa_2048.pub testout/openssl_rsa_2048.pem
+
+# dsa keys
+./keyconvert test/openssh_dsa_512.pub testout/openssl_dsa_512.pem
+./keyconvert test/openssh_dsa_1024.pub testout/openssl_dsa_1024.pem
+./keyconvert test/openssh_dsa_2048.pub testout/openssl_dsa_2048.pem
+
+# make a test file to encrypt
+echo "this is a test to see if the key conversion routines work" > test.txt
+
+# test the keys
+./testkey.sh -sha1 rsa_512
+./testkey.sh -sha1 rsa_1024
+./testkey.sh -sha1 rsa_2048
+./testkey.sh -dss1 dsa_512
+./testkey.sh -dss1 dsa_1024
+./testkey.sh -dss1 dsa_2048
diff --git a/keyconvert/test.txt b/keyconvert/test.txt
new file mode 100644 (file)
index 0000000..0bd7ba1
--- /dev/null
@@ -0,0 +1 @@
+this is a test to see if the key conversion routines work
diff --git a/keyconvert/test/openssh_dsa_1024 b/keyconvert/test/openssh_dsa_1024
new file mode 100644 (file)
index 0000000..f6c3f7d
--- /dev/null
@@ -0,0 +1,12 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBvQIBAAKBgQDx32kPfS+uiVq6pqgEGORLZx0EfSXvlluD/nKtLQoBxDY7JntP
+oVyI29KPVSnsjqEAVI7r9pEJ/aszrc4jLj5dbjqehLF5qnkrr/XAcTv4MsxKuyDy
+6R0AhU91YrkChO8JedxbUdf6lI3DLREaRIvLhHew05k34W0dGdEV/U/hvQIVANT3
+PYXSBKIShJovHfC4YQ65kOy3AoGBANs/BTSWWUEs3jppa65VZV/8WbV7Q3uV9PVu
+Ljf6E9DKFI5PPbJOMPbX7XF3zrCRtiTVl1dTc/xH7LYXvHTVU469mRpdNDwCMF5r
+y1bWbVVKhIrcrlVnEF3+up2jD7Xu+tfIn/YmJyrHhvKV842HLv+LAbUJbMQ/9POt
+5w9RufrNAoGBAJYsrPd4VhUQwTzWW/LQmIevjT/X5T2putWXttsZ1KzMP2qi9rf8
+GATnPJahYq1DXgNSPcqIHF5FUgVEITJ3R/CTCFiKF/+N5yBzEXmbo+HGG8W1hKnp
+QdzVKZq0esGwEKfkZ0lUPJCh5IYyRL8ceh8KRjEFSKuSEPZqwrngklw0AhUAg8tD
+T7VLBFkDCC7bhsKqFkJ4AAo=
+-----END DSA PRIVATE KEY-----
diff --git a/keyconvert/test/openssh_dsa_1024.pub b/keyconvert/test/openssh_dsa_1024.pub
new file mode 100644 (file)
index 0000000..d81b006
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAPHfaQ99L66JWrqmqAQY5EtnHQR9Je+WW4P+cq0tCgHENjsme0+hXIjb0o9VKeyOoQBUjuv2kQn9qzOtziMuPl1uOp6EsXmqeSuv9cBxO/gyzEq7IPLpHQCFT3ViuQKE7wl53FtR1/qUjcMtERpEi8uEd7DTmTfhbR0Z0RX9T+G9AAAAFQDU9z2F0gSiEoSaLx3wuGEOuZDstwAAAIEA2z8FNJZZQSzeOmlrrlVlX/xZtXtDe5X09W4uN/oT0MoUjk89sk4w9tftcXfOsJG2JNWXV1Nz/Efsthe8dNVTjr2ZGl00PAIwXmvLVtZtVUqEityuVWcQXf66naMPte7618if9iYnKseG8pXzjYcu/4sBtQlsxD/0863nD1G5+s0AAACBAJYsrPd4VhUQwTzWW/LQmIevjT/X5T2putWXttsZ1KzMP2qi9rf8GATnPJahYq1DXgNSPcqIHF5FUgVEITJ3R/CTCFiKF/+N5yBzEXmbo+HGG8W1hKnpQdzVKZq0esGwEKfkZ0lUPJCh5IYyRL8ceh8KRjEFSKuSEPZqwrngklw0 smbaker@test64
diff --git a/keyconvert/test/openssh_dsa_2048 b/keyconvert/test/openssh_dsa_2048
new file mode 100644 (file)
index 0000000..b43eb65
--- /dev/null
@@ -0,0 +1,20 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIDPgIBAAKCAQEAhvJpPI7AbHEyXauGmXyCGsVCkTXD4i9b/eobbwG1Hhm8FvtM
+wq5oopWItMH0HMcKfBGmHlp46u5KJcYmrSsHSDX+6n9+Mw/Pn2Sldg26OTkyfsaV
+qelapH0Q3ILt8fTrHosy9aosBiZbu4wPdjiBs441ekhGpZfsdaa3g657VGSG1YqH
+S/eMw7fs068Vsp5ickYCapI+XICFnf2lQesC4gfElDRGOG3/6n0Pkhsw0TwXRgka
+GgXfxHR4CPIlH7fV1/QIYXLXRU8ftkrwakIltSrl50pQOXDuCOGR49ng2JaxFdWv
+sjUundZsmnWjGFFE2ORrTBFHagmwOsQXY4vOXwIVAJtUPdFxKVNC2t89reLuOGao
+FFxJAoIBAQCAZYog0D72F0TIAIMIahnDDNjN2T3Sb3Zqhd27oExdUpbNDbM8F+qY
+HpqJRtQRc59sSsroif+K0yEaeReOapEb6Cf1N4yGDppr1ClMBGHKk/Wsjf/ASqa8
+/mibtSF4P5I6e0w8FWrTrhu2vJ9W2ONRqVAUxgBMsEKXFXvkYtf31LKsQFUEcmtO
+uXalXiKAdr+APQya6lDiUxGELjuNzwsGxjdo15wa6NcKLfHUv3XYU6WxL2USGFBW
+5I1aHu/Uc7YGhl2I9fSulzotEc4PV40nlC54NVx65pQjeViJ4ZSSlrSm58xxfrdF
+TnWvEJjSu6CAFYfWEzx5RtbjuWMk6yAdAoIBAFx7TsT+G3sryKRs4DRWSSlU8PAO
+2I326UJps4CiiAS6x6XGnB9kLX3E/xfdmM9mrhQBNn0OPo5iCK2me1W2sXQ6QWD/
+dRhKwIcrHVexwu5iMtoMtMAeDI5P7/ahVSIxDAKkABD4hDJB3UcTDYXaz1/bNqW6
+FXYK2C9CrfhYF3NX28MU+eJhIFRpEaVU42bQ5OeDaJiz2tQeSrT5LqbV58RhARew
+9tK1FOCBTBsJ+bBr4Q5f9bFNpSqqn513H/cc6qkuRCluxeGTAtNt5qdHYH+rvxey
+FpBzy8MmXkHxsQWxZ1DAkaUgPaxXevNQRk/iNsk1W3zWqJ72KI5lNFgJ9yECFA/o
+gWjBm06JTkYWBOgkYRRVRzr7
+-----END DSA PRIVATE KEY-----
diff --git a/keyconvert/test/openssh_dsa_2048.pub b/keyconvert/test/openssh_dsa_2048.pub
new file mode 100644 (file)
index 0000000..69d00b6
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAAEBAIbyaTyOwGxxMl2rhpl8ghrFQpE1w+IvW/3qG28BtR4ZvBb7TMKuaKKViLTB9BzHCnwRph5aeOruSiXGJq0rB0g1/up/fjMPz59kpXYNujk5Mn7GlanpWqR9ENyC7fH06x6LMvWqLAYmW7uMD3Y4gbOONXpIRqWX7HWmt4Oue1RkhtWKh0v3jMO37NOvFbKeYnJGAmqSPlyAhZ39pUHrAuIHxJQ0Rjht/+p9D5IbMNE8F0YJGhoF38R0eAjyJR+31df0CGFy10VPH7ZK8GpCJbUq5edKUDlw7gjhkePZ4NiWsRXVr7I1Lp3WbJp1oxhRRNjka0wRR2oJsDrEF2OLzl8AAAAVAJtUPdFxKVNC2t89reLuOGaoFFxJAAABAQCAZYog0D72F0TIAIMIahnDDNjN2T3Sb3Zqhd27oExdUpbNDbM8F+qYHpqJRtQRc59sSsroif+K0yEaeReOapEb6Cf1N4yGDppr1ClMBGHKk/Wsjf/ASqa8/mibtSF4P5I6e0w8FWrTrhu2vJ9W2ONRqVAUxgBMsEKXFXvkYtf31LKsQFUEcmtOuXalXiKAdr+APQya6lDiUxGELjuNzwsGxjdo15wa6NcKLfHUv3XYU6WxL2USGFBW5I1aHu/Uc7YGhl2I9fSulzotEc4PV40nlC54NVx65pQjeViJ4ZSSlrSm58xxfrdFTnWvEJjSu6CAFYfWEzx5RtbjuWMk6yAdAAABAFx7TsT+G3sryKRs4DRWSSlU8PAO2I326UJps4CiiAS6x6XGnB9kLX3E/xfdmM9mrhQBNn0OPo5iCK2me1W2sXQ6QWD/dRhKwIcrHVexwu5iMtoMtMAeDI5P7/ahVSIxDAKkABD4hDJB3UcTDYXaz1/bNqW6FXYK2C9CrfhYF3NX28MU+eJhIFRpEaVU42bQ5OeDaJiz2tQeSrT5LqbV58RhARew9tK1FOCBTBsJ+bBr4Q5f9bFNpSqqn513H/cc6qkuRCluxeGTAtNt5qdHYH+rvxeyFpBzy8MmXkHxsQWxZ1DAkaUgPaxXevNQRk/iNsk1W3zWqJ72KI5lNFgJ9yE= smbaker@test64
diff --git a/keyconvert/test/openssh_dsa_512 b/keyconvert/test/openssh_dsa_512
new file mode 100644 (file)
index 0000000..003f01c
--- /dev/null
@@ -0,0 +1,8 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIH4AgEAAkEAm3PK+DSgbavp8uFzwHkLBQkAQ+zYH7oQQfVf9qfj9McPwPSRjyE2
+euX37kG9V+8fMYGkrXiAnTF338/7l/BitQIVAPhdznYDxCFE+K7Fkmric3uRLhKl
+AkASi9+yBXkSh/PBIB2VTwUNJ2Je2rMT/KArLw86dQuMdV2QPnCI4jwvFeWJW8q1
+CSKyBcwoxaSwPN6MAYNRLmPtAkA/5M4TgOWQjoUDc1DwwAFzl8kXc8Jywyz3Ck1a
+uCgs+unOttuDT+ZYicDRSnq7G3paTGm5U9h3Pf4BOzqKymxmAhUAsvh3vpJX52p7
+WTaXKaBm7ysblAE=
+-----END DSA PRIVATE KEY-----
diff --git a/keyconvert/test/openssh_dsa_512.pub b/keyconvert/test/openssh_dsa_512.pub
new file mode 100644 (file)
index 0000000..a4a4f6e
--- /dev/null
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAABBAJtzyvg0oG2r6fLhc8B5CwUJAEPs2B+6EEH1X/an4/THD8D0kY8hNnrl9+5BvVfvHzGBpK14gJ0xd9/P+5fwYrUAAAAVAPhdznYDxCFE+K7Fkmric3uRLhKlAAAAQBKL37IFeRKH88EgHZVPBQ0nYl7asxP8oCsvDzp1C4x1XZA+cIjiPC8V5YlbyrUJIrIFzCjFpLA83owBg1EuY+0AAABAP+TOE4DlkI6FA3NQ8MABc5fJF3PCcsMs9wpNWrgoLPrpzrbbg0/mWInA0Up6uxt6WkxpuVPYdz3+ATs6ispsZg== smbaker@test64
diff --git a/keyconvert/test/openssh_rsa1_1024 b/keyconvert/test/openssh_rsa1_1024
new file mode 100644 (file)
index 0000000..1d814be
Binary files /dev/null and b/keyconvert/test/openssh_rsa1_1024 differ
diff --git a/keyconvert/test/openssh_rsa1_1024.pub b/keyconvert/test/openssh_rsa1_1024.pub
new file mode 100644 (file)
index 0000000..8e8d308
--- /dev/null
@@ -0,0 +1 @@
+1024 35 129881281989970257849297143265405883841808716551531717161470388680233069834806491515662719447667414192316994820475038514678885956467447964923197868990351993958234384078203216494595575140725420329195654521080877033819243506183873392482029450927674981321293693168525102276485740189208563187461931348496284073193 smbaker@test64
diff --git a/keyconvert/test/openssh_rsa1_2048 b/keyconvert/test/openssh_rsa1_2048
new file mode 100644 (file)
index 0000000..adf13a2
Binary files /dev/null and b/keyconvert/test/openssh_rsa1_2048 differ
diff --git a/keyconvert/test/openssh_rsa1_2048.pub b/keyconvert/test/openssh_rsa1_2048.pub
new file mode 100644 (file)
index 0000000..8e44071
--- /dev/null
@@ -0,0 +1 @@
+2048 35 24962157904933386430289996182561670350750587808098241441684009673343331428018121642773893758528257864455887921889391600744909650863357446121763274135964860311094796038726741333109129308021024853945167223976961404644818452025130516204197410684388539496264836113893019917274320123849831069149349406430045852390329296737321686898170507200472856028425719837216148581236896907337787170590524504382167005872101057744617682247988500610477193140983913123507527384148704894663287519370503887384332696230450497547440681808464617977849888981033678132856675421465284453029930637905017868780839285125352782073857421780734978493573 smbaker@test64
diff --git a/keyconvert/test/openssh_rsa1_512 b/keyconvert/test/openssh_rsa1_512
new file mode 100644 (file)
index 0000000..4a353cb
Binary files /dev/null and b/keyconvert/test/openssh_rsa1_512 differ
diff --git a/keyconvert/test/openssh_rsa1_512.pub b/keyconvert/test/openssh_rsa1_512.pub
new file mode 100644 (file)
index 0000000..5bc93a4
--- /dev/null
@@ -0,0 +1 @@
+512 35 13061984420212984636582394800944353832030760610842910680821680254617574712157058435404440827653567296052614504017646755849229554697341079808835532254398769 smbaker@test64
diff --git a/keyconvert/test/openssh_rsa_1024 b/keyconvert/test/openssh_rsa_1024
new file mode 100644 (file)
index 0000000..0ec5529
--- /dev/null
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQDcH11wYBhzzPX3cqz2Wc+tVks0RMoWBCW+aWgvW0I8/Qqf03xo
+a2ocNu8eFeRNTmcnp44SH/AnXmWXxFGigC76R4b//VZZ0L5bITI605JoctdLDndq
+cvZdV23neYv/xr6d8umtmsMn79EunFPoamv2ByjY1Ro4HqqrlpaA+ZoZWwIBIwKB
+gDiaWdsRZV+bGq1YAJceaJpJY8ucqP5Y1oFrj9GpwJNXArtiRI/hG0kVcK/3ADEi
+yhGC22O/Ed482EuY4cqzP0cxwdUxMF/QTSd9DWXPbmzSjRaMZcANUtCVizLWn88K
+IVIg2vRhZqpivyxTgPVCCLhUPirLAQld8qVQ3M3RZe5zAkEA+YlG16DO8QTAEIEu
+NhFQpcrTVrjj2JqbImg6TeiBedJ1qFyfwHEvT3eTb2pjdNq1pE5kdW85fLIznPvJ
+4vuAHwJBAOHTCkn5a5k4OmNEDuiaxe+SdVzdf0oZs32vdbAZkgkVPjyO5bTfKSBV
+tegs559vVxs+BthuExgsZtuVXcvZT0UCQQCj+x/syMKBIGD05yz+9W+C5F7+eX/I
+2qB1sjTxXkZ0oD6wd2GqWQHVIrFX2DK6gRhHZrcLV7gQHVUeBIv7j1QxAkEArjUW
+kNZaUaBnjmezusCKEJWNvKreiZ7MSwOyjymrK5QLcIt+AI7lNjN9sxtTmD/yvT56
+TzBX33K1v1X35mXPbwJAX/NeuLrH8m/EVPrskD3nFlEg69zaB5x4EjU6GtvRW7Gz
+Qo61Lj/KAbbKS7J0GFORm7gAuNWVAwiFxjbdBfnhAw==
+-----END RSA PRIVATE KEY-----
diff --git a/keyconvert/test/openssh_rsa_1024.pub b/keyconvert/test/openssh_rsa_1024.pub
new file mode 100644 (file)
index 0000000..a1b8587
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA3B9dcGAYc8z193Ks9lnPrVZLNETKFgQlvmloL1tCPP0Kn9N8aGtqHDbvHhXkTU5nJ6eOEh/wJ15ll8RRooAu+keG//1WWdC+WyEyOtOSaHLXSw53anL2XVdt53mL/8a+nfLprZrDJ+/RLpxT6Gpr9gco2NUaOB6qq5aWgPmaGVs= smbaker@test64
diff --git a/keyconvert/test/openssh_rsa_2048 b/keyconvert/test/openssh_rsa_2048
new file mode 100644 (file)
index 0000000..4b32b5c
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEAzKF8Ty+W800JzUEi74sw91ghB9ypEd00pFRluUJI0+6RC9EW
+TBfH1PT3N7RsICuO4L3M8UGJUAnNfqXT92wbwZ2ECHB/CyKqyuBigVOZii4tJXj4
+LIeszk5qDkVfgxFr8BaKiMn8dt0z7VLS4bEDVSrJil3B8pWDMeyv8weky0vziuFL
+1j2W5daJg72lh0CxSQWtsKD6/ZsZB/DqqdfSS3K28yRJk6Z8DfWpo1XfG6ZTR8u6
+C1h/Ebi35jA1JxrAYp2r42P8xJDrXJkOlo92aZa/Dk5lc961OCiycIuZ8zahIXDr
+muomuuQrP0nUoX+rmCFnxFgLgCia29DU0E1pvwIBIwKCAQEAuxdNFTLTJ5bkY+PI
+K3fyQTqh201nYMo+wiFHD8eTCui/IL8qVDL/2KV0UC/t1EUU6rwpFxdY+LiBXdlx
+Vz5FQ04vkq//IB+yGJKjNGmw811rGvJB/NPRMabHXYFBYeQK6iM81NXuI4hp/Y2N
+myV/Y89ZLgyUEP25xz7MwPELsozy10Jd07XNPvkwviaW10knAHAQY/RwwATCyrWk
+uhcMYyvrEpvK+jw93D9iSVxFtOrVn2JKnd0mXZTumye3DHUyR6uy80+dnrE+GKiR
+QlCIA51i1WBNA1/IerTpsUdURA+JM1L+i6s+XvT5mr5V31Mau7MQmayRySS8ImSQ
+XBVeiwKBgQDrWPUOITu/6btSdl9V+dgK2YEidrVcOfZA7K3JqssHuCk0pDcP/k0m
+eQ9I/t692YSMxqmcewzzeJ8p65ec67l4pdwdQJwxqfEyaUSmdzMhr9FXU1R+pIcI
+u9yypkG444kHFC7iu2Oh4+aCG265FF+LWh6aC4lVn+KjvLCEU/GIYwKBgQDelnun
+FXL+fzqpvWQakfCjxwn5TJhDcZ+jDYx004OVBtF5MpLTk6dx7AENJDo1BEDs2s6b
+86Gpor6pAOUoBcEYvl3C6Ki2tQ3dCFwJPtQ/9dFDoZiSk6bpNhYgMGPc5Tyb/R9C
+dsM4nyG4IprtoN07ALbzkLn2bEXJWYJSl6SB9QKBgBrlmFli4kHRkcBICuVBIAE9
+bdgNkRHavQ679pq0bvmRY8uAe1JI8t/TUjQ6YplasBAWtExl1ZgrCuA4LpWXSGWP
+TFsdU63niUeXAIgNn3GQb7I1aL4ELLCKf59jdTmzmqG5Ke4GyY7YN5nXP9qjPh6N
+9N5nt+yHTRoG75oYONxjAoGBAKu16lxSYAYnokhth7y5uaLqAGE7Fl/p8C1TmDzd
+rqYp1Ms1pHdUpb5IWJUb8mNprm2S2eYFFk+pboJfxrh5d7QAkXkZ4Tx9CrHTP69c
+Wpe9oW6v3BlNVN/Ko1qo/JR2U1PDRAASeVeQs5ys+yxXhheS1kbdXEHBPSZMXThm
+WlWfAoGAGZSqAK/6vz0vyUcPlxeQLKjibYO3AmQQ5BxxvzA+Da59f8IrvAa9ujAR
+ISpIIo4l+DeEDumPVHWjz2W7ho3tPZ3IyXFUUtnh+Rcor9rxw6/gXzaoTlodjvve
+0woZJu0OoYFjQMPm1jlR6ekwm2Ep97I05IaFMDPDhZJUw2sIPRM=
+-----END RSA PRIVATE KEY-----
diff --git a/keyconvert/test/openssh_rsa_2048.pub b/keyconvert/test/openssh_rsa_2048.pub
new file mode 100644 (file)
index 0000000..47c6f4c
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzKF8Ty+W800JzUEi74sw91ghB9ypEd00pFRluUJI0+6RC9EWTBfH1PT3N7RsICuO4L3M8UGJUAnNfqXT92wbwZ2ECHB/CyKqyuBigVOZii4tJXj4LIeszk5qDkVfgxFr8BaKiMn8dt0z7VLS4bEDVSrJil3B8pWDMeyv8weky0vziuFL1j2W5daJg72lh0CxSQWtsKD6/ZsZB/DqqdfSS3K28yRJk6Z8DfWpo1XfG6ZTR8u6C1h/Ebi35jA1JxrAYp2r42P8xJDrXJkOlo92aZa/Dk5lc961OCiycIuZ8zahIXDrmuomuuQrP0nUoX+rmCFnxFgLgCia29DU0E1pvw== smbaker@test64
diff --git a/keyconvert/test/openssh_rsa_512 b/keyconvert/test/openssh_rsa_512
new file mode 100644 (file)
index 0000000..bd980ff
--- /dev/null
@@ -0,0 +1,9 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIBOAIBAAJBAMRoeFn+NZYWZxbCMk1+kVCFHQrI9mpASrc0uDX/ZF45ymcrSjCM
+E+IeTq82wpoTcCY93vjSma6L6eO1PRePqvkCASMCQQC5L0znIuIRKxC9r8kHPNIn
+WO9/MoHvJqzYn2vbI/+MCPFrDFELJF4lV6CrVYi105n2KydKPN13NvdKzdbg0JoL
+AiEA9y1JKDVsxd38kcZLsmamBqsVT0nHj4kAF50pniD+EokCIQDLa0Gs/tHx7Aqe
+I69gLMNKETjaYE5dUcXjRMiURjB48QIgW8796lz8hAH+uc1PUORMS56hg9mTQ/EO
+qa9nOrvMFYMCIG5tbMugRhWdZNmBFg+jRXFZzmfrIzn5MOkWtgdZTYN7AiA9ckb9
+BnkGtXbl/dn7ZQ7ITS8/5dlBzM+9e16LXujjAg==
+-----END RSA PRIVATE KEY-----
diff --git a/keyconvert/test/openssh_rsa_512.pub b/keyconvert/test/openssh_rsa_512.pub
new file mode 100644 (file)
index 0000000..62e9dbf
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAEEAxGh4Wf41lhZnFsIyTX6RUIUdCsj2akBKtzS4Nf9kXjnKZytKMIwT4h5OrzbCmhNwJj3e+NKZrovp47U9F4+q+Q== smbaker@test64
diff --git a/keyconvert/testkey.sh b/keyconvert/testkey.sh
new file mode 100755 (executable)
index 0000000..f8bd69b
--- /dev/null
@@ -0,0 +1,6 @@
+# do not execute this script directly; it is run by test.sh
+
+rm -rf signature.bin
+openssl dgst $1 -sign test/openssh_$2 test.txt > signature.bin
+openssl dgst $1 -signature signature.bin -verify testout/openssl_$2.pem test.txt
+rm -rf signature.bin