Testing various openssl on NeXT. The ARCH is now required to write appropriately named execs.
make ARCH=i386
To make with differences,
make SSL_DIR=~/Projects/openssl-1.0.2l.dirty CC=m68k-next-nextstep3-gcc ARCH=m68k
$ ./t-rsa-i386.exe
Testing RSA functions with EVP_DigestSign and EVP_DigestVerify
BN_new....
EVP_PKEY_new (skey)....
EVP_PKEY_new (vkey)....
RSA_generate_key....
Saving private key...
Saving public key...
Created signature
Signature: 53817D5831BDCF5BF3FCBE719AE95465F5EA92E49E1243E71DB3C9550E8EBFFB52F9AFAA89DC78462B8A27A48222DACDE55392716183CB9CB0D8E67147AB7A6B941843D8CAD01B8CBD724BBACA335F6AC45DC0655A5E6DA25D869B19B0EF604D21FB041DEC094E3FDBDF6C95482E51183EAFA84B8142B8E289B7E85567052A14
EVP_DigestVerifyFinal: slen: 128
Debug Signature: 53817D5831BDCF5BF3FCBE719AE95465F5EA92E49E1243E71DB3C9550E8EBFFB52F9AFAA89DC78462B8A27A48222DACDE55392716183CB9CB0D8E67147AB7A6B941843D8CAD01B8CBD724BBACA335F6AC45DC0655A5E6DA25D869B19B0EF604D21FB041DEC094E3FDBDF6C95482E51183EAFA84B8142B8E289B7E85567052A14
in(sha256) expect(sha256)
Verified signature
openssl rsa -pubout -in private.pem
writing RSA key
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFkVmERJwWd+wCM9aFZRdJD7N+
2x/bDETfmGQ+1bmuLpVE4xXSjfiTcDuadyRaCJly7zE7zl2rIiCYCD7RpSJGob1x
O8/yoezVwQJkHK3XEYV8xks8b93eI6bz+Rs4iEPLimlXQngqlOQeH4xOV7w2pSaL
jHRkjVk7dKNiOghf/QIDAQAB
-----END PUBLIC KEY-----
cat public.pem
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFkVmERJwWd+wCM9aFZRdJD7N+
2x/bDETfmGQ+1bmuLpVE4xXSjfiTcDuadyRaCJly7zE7zl2rIiCYCD7RpSJGob1x
O8/yoezVwQJkHK3XEYV8xks8b93eI6bz+Rs4iEPLimlXQngqlOQeH4xOV7w2pSaL
jHRkjVk7dKNiOghf/QIDAQAB
-----END PUBLIC KEY-----
$ ./t-hmac-i386.exe
Testing HAMC functions with EVP_DigestSign
HMAC key: C9E7193C9FFBE7C1C2D937A87D9EC5B7CAC774FA574EED3CCE07B3E178CD1F9A
Created signature
Signature: 4B03E2DB870D1C05C5592400672BB5D2F9CDEECA659AB2A07EFA0B37AE6AC13A
Verified signature
:(
./t-rsa-m68k.exe
Testing RSA functions with EVP_DigestSign and EVP_DigestVerify
BN_new....
EVP_PKEY_new (skey)....
EVP_PKEY_new (vkey)....
RSA_generate_key....
Saving private key...
Saving public key...
Created signature
Signature: 93AAB91DD29DE4FB905582EFEE4B1D44C44CA47D5AD0DD24EEC39119D5F7EDA326A03AAFA0C479AA1EFAE5651DF15A3C0A6C88E6B3C9C20A852CE0DA80AA4EB841C1452B9E1D0AAEFA857AF63F15CBD1FC183A87053B07D3A49370CAEBFE8B63A0C6973DBA9ECD0C1875C5B4F439B52C6051376FC864E6208AC6E54466D4BBDD
EVP_DigestVerifyFinal: slen: 128
Debug Signature: 93AAB91DD29DE4FB905582EFEE4B1D44C44CA47D5AD0DD24EEC39119D5F7EDA326A03AAFA0C479AA1EFAE5651DF15A3C0A6C88E6B3C9C20A852CE0DA80AA4EB841C1452B9E1D0AAEFA857AF63F15CBD1FC183A87053B07D3A49370CAEBFE8B63A0C6973DBA9ECD0C1875C5B4F439B52C6051376FC864E6208AC6E54466D4BBDD
EVP_DigestVerifyFinal failed, error 0x4091064
Failed to verify signature, return code 1
Despite the above fail, this update writes out a private/public key, which match (against another openssl via NFS).
openssl rsa -pubout -in private.pem
writing RSA key
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDnBtSMpTOoK8UhlWbYGRebE9Y7
1oDM46x/FX6Vv33XN13o1y0MHSzJxf9g5kOG43Rk12fL335LBA+8MiNOS8hiiZYE
j1Ipuyy2Vw4kmw2tcOYfNFVS2Mbz7atzhvfMiZR9/1N1n8xcwCLQreeAgLyAXLXS
kjIJVU9ymxhfvTXdDwIDAQAB
-----END PUBLIC KEY-----
cat public.pem
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDnBtSMpTOoK8UhlWbYGRebE9Y7
1oDM46x/FX6Vv33XN13o1y0MHSzJxf9g5kOG43Rk12fL335LBA+8MiNOS8hiiZYE
j1Ipuyy2Vw4kmw2tcOYfNFVS2Mbz7atzhvfMiZR9/1N1n8xcwCLQreeAgLyAXLXS
kjIJVU9ymxhfvTXdDwIDAQAB
-----END PUBLIC KEY-----
hmac works fine...
$ ./t-hmac-m68k.exe
Testing HAMC functions with EVP_DigestSign
HMAC key: 4CC6C661D786BABDE7746038FAF663133DE15CCAAC132C739CA2C11C838047D6
Created signature
Signature: 866B05C7D02367A44C6DE5DB3090383D3E0EC54B01548380467A581B5EA39A43
Verified signature
https://zakird.com/2013/10/13/certificate-parsing-with-openssl https://www.codepool.biz/how-to-use-openssl-generate-rsa-keys-cc.html https://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art054