1

I followed the instructions from this post to download and configure a 32 bit version of openssl for mac

How do I build OpenSSL as 32-bit (i386) on Mac OS X?

Problem is, I'm not actually sure how to use it. I don't want to replace my current version

OpenSSL 0.9.8zh 14 Jan 2016

however, I would like to have the 32 bit command execute from from the directory in which I downloaded it to.

Any help would be appreciated

---Here is what happens now when I cd into the apps directory

and run the openssl

WARNING: can't open config file: /usr/local/ssl/openssl.cnf OpenSSL> version OpenSSL 1.0.0a 1 Jun 2010

I presume this warning is related to the fact that I have openssl 64 bit default still in its original location and that I have not modified this file?

All I want to do is generate 32bit ssl keys for testing purposes.


I want to create 32 bit versions of these certificates is it simply a case of replacing 2048 with 32 then?

Create CA certificate

openssl genrsa 2048 > ca-key.pem
openssl req -new -x509 -nodes -days 3600 -key ca-key.pem -out ca.pem -extensions usr_cert -subj '/C=US/ST=New York/L=Brooklyn/O=Example Brooklyn Company/CN=examplebrooklyn.com'

Create server certificate, remove passphrase, and sign it

server-crt.pem = public key, server-key.pem = private key

openssl req -newkey rsa:2048 -days 3600 -nodes -keyout server-key.pem -out server-req.pem -extensions usr_cert -subj '/C=US/ST=New York/L=Brooklyn/O=Example Brooklyn Company/CN=myname.com'
openssl rsa -in server-key.pem -out server-key.pem
openssl x509 -req -in server-req.pem -days 3600 -CA ca.pem -CAkey ca-key.pem -set_serial 01 -out server-crt.pem -extensions usr_cert

Create client certificate, remove passphrase, and sign it

client-crt.pem = public key, client-key.pem = private key

openssl rsa -in client-key.pem -out client-key.pem
openssl x509 -req -in client-req.pem -days 3600 -CA ca.pem -CAkey ca-key.pem -set_serial 01 -out client-crt.pem -extensions usr_cert
  • In the directory you built in, assuming OpenSSL on Mac OS X is like every other version of OpenSSL that I've built, there should be an `apps` directory created during the build process. In that directory, you should find the `openssl` binary. If you have problems finding libraries, the easiest fix is to rebuild, and run `./config -disable-shared` to create only the static libraries (assuming, again, that it's the same on Mac OS X...) – Andrew Henle Feb 05 '19 at 16:28

1 Answers1

0

All I want to do is generate 32bit ssl keys for testing purposes.

You don't need a 32-bit OpenSSL library to do that.

If you want to generate a 32-bit RSA key for some reason, running openssl genrsa 32 will do that. (Such a key is completely insecure, so I hope you have a good reason for doing this.)