title: Why openssl on windows produces error but not on centos: PKCS12_parse: mac verify failure (OpenSSL::PKCS12::PKCS12Error)
body: <pre><code>require 'openssl'
  
  if ARGV.length == 2
      pkcs12 = OpenSSL::PKCS12.new(File.read(ARGV[0]), ARGV[1])
      p pkcs12.certificate
  else
      puts "Usage: load_cert.rb &lt;path_to_cert&gt; &lt;cert_password&gt;"
  end
  </code></pre>
  
  <p>Running this produces error on windows but not in linux.</p>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>OpenSSL::PKCS12::PKCS12Error: PKCS12_parse: mac verify failure<br>
            from (irb):21:in <code>initialize</code><br>
            from (irb):21:in <code>new</code><br>
            from (irb):21<br>
            from C:/Ruby192/bin/irb:12:in <code>&lt;main&gt;</code></p>
  </blockquote>