title: Getting an error when trying to decrypt file using openssl
body: <p>I'm trying to use openssl to encrypt a private key that I later need to decrypt to use as part of a JWT auth workflow. </p>
  
  <p>The steps to generate the key are below:</p>
  
  <pre><code>$ openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
  $ openssl rsa -passin pass:x -in server.pass.key -out server.key
  $ rm server.pass.key
  $ openssl req -new -key server.key -out server.csr
  $ openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key - 
  out server.crt
  $ rm server.csr
  $ openssl aes-256-cbc -k $KEY -in assets/server.key -out 
  assets/server.key.enc -e
  </code></pre>
  
  <p>the $KEY is a symmetric password I've saved to my bash instance. When I try to decrypt I get this error:</p>
  
  <pre><code>openssl aes-256-cbc -k $KEY -in assets/server.key.enc -out assets/server.key -d -md sha256
  
  bad decrypt
  4736276076:error:06FFF064:digital envelope routines:CRYPTO_internal:bad 
  decrypt:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl- 
  22.240.1/libressl-2.6/crypto/evp/evp_enc.c:533:
  </code></pre>
  
  <p>Thanks,</p>