Openssl key generation on OS X failing

11,532

I have solved the issue with many google searches and consultation with a colleague who has also recently moved to a mac.

The symlinks for the new openssl where not created when homebrew did the installation. If you run brew link openssl you will receive the following message Warning: openssl is keg-only and must be linked with --force

This leads the the solution. Homebrew needs to be explicitly told to create the correct links.

brew link --force openssl

If you now check which openssl you will notice it points to the brew installed version /usr/local/bin/openssl

Share:
11,532

Related videos on Youtube

robinjohnobrien
Author by

robinjohnobrien

Updated on September 20, 2022

Comments

  • robinjohnobrien
    robinjohnobrien over 1 year

    I am attempting to run our unit tests on a new clean mac for a Spring project. One test requires the generation of ssl keys.

    I have installed openssl via homebrew but the error continues to persist.

    Please see error below:

    Using configuration from /Users/myuser/workspace/project/webapp/target/test-data/clientvpn/acc1/openssl.conf
    default is an unsupported message digest type
    13499:error:02001002:system library:fopen:No such file or directory:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59/src/crypto/bio/bss_file.c:126:fopen('./index.txt.attr','rb')
    13499:error:2006D080:BIO routines:BIO_new_file:no such file:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59/src/crypto/bio/bss_file.c:129:
    13499:error:0E078072:configuration file routines:DEF_LOAD:no such file:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59/src/crypto/conf/conf_def.c:197:
    
    • jww
      jww over 8 years
      Type which openssl and report back.
    • robinjohnobrien
      robinjohnobrien over 8 years
      Thanks for the response. which openssl printed /usr/bin/openssl which is the for the non-homebrew version of openssl. Forcing brew to link the new openssl solved the problem. Please see answer below for a slightly longer description.
  • IgorGanapolsky
    IgorGanapolsky over 2 years
    openssl:Error: '-CAcreateserial' is an invalid command.