Its been days trying to figure out what could be wrong, hence I need
some one who already did tried to read pkcs12 certificate before.
This is code which I'm using both on centos and windows,
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 "
end
Running this produces error on windows but not in linux/cygwin
Error:
OpenSSL::PKCS12::PKCS12Error: PKCS12_parse: mac verify failure from
(irb):21:in initialize' from (irb):21:innew' from (irb):21 from
C:/Ruby192/bin/irb:12:in `'
This has been so frustrating, that I tried to produce own certificate
own windows then tried again but it gives same error
OpenSSL::PKCS12::PKCS12Error: PKCS12_parse: mac verify failure from
(irb):21:in initialize' from (irb):21:innew' from (irb):21 from
C:/Ruby192/bin/irb:12:in `'
Maybe Process Monitor from Sysinternals Suite can help you follow
syscalls of the process and identify the issue.
Kind regards
robert
···
On Sun, Apr 22, 2012 at 9:35 AM, Nauman Thanvi <lists@ruby-forum.com> wrote:
OpenSSL::PKCS12::PKCS12Error: PKCS12_parse: mac verify failure from
(irb):21:in initialize' from (irb):21:innew' from (irb):21 from
C:/Ruby192/bin/irb:12:in `'
On Sun, Apr 22, 2012 at 9:35 AM, Nauman Thanvi <lists@ruby-forum.com> > wrote:
OpenSSL::PKCS12::PKCS12Error: PKCS12_parse: mac verify failure from
(irb):21:in initialize' from (irb):21:innew' from (irb):21 from
C:/Ruby192/bin/irb:12:in `'
Thanks in advance for any clue or help,
Maybe Process Monitor from Sysinternals Suite can help you follow
syscalls of the process and identify the issue.
Kind regards
robert
I don't seems to understand, how in this context it can help me? can you
please explain bit more?
PM is capable of tracing all syscalls and recording them along with
arguments and return values IIRC. That way you often get a good idea
what a program does and what the source of such an error might be. Of
course this works only if the error has something to do with the
system and is not internally in program logic. I suspect your case
has to do with the system. That's why I suggested this.
Cheers
robert
···
On Mon, Apr 23, 2012 at 3:12 AM, Nauman Thanvi <lists@ruby-forum.com> wrote:
I don't seems to understand, how in this context it can help me? can you
please explain bit more?