1

I can run a command like the following in my script on linux:

openssl dgst -sha256 \
             -mac HMAC \
             -macopt hexkey:xxxx

But this command fails on mac os with the error

unknown option '-mac'

I've tried sifting through man pages and online but I can't find any way to accomplish similar task using mac's version of openssl?

jpaugh
  • 1,390

1 Answers1

1

What version of macOS is this? Older releases (10.11) have an old openssl that fails

$ /usr/bin/openssl version
OpenSSL 0.9.8zh 14 Jan 2016
$ /usr/bin/openssl dgst -sha256 -mac HMAC -macopt hexkey:DEADBEEF
unknown option '-mac'
...

while newer (10.13) instead have LibreSSL that does not error out for your command. On older macs you could perhaps install openssl via a ports system (Fink, Homebrew, MacPorts).

thrig
  • 816