Skip to content

OpenSSL::PKey.read throws a null pointer exception  #1784

@mehmetc

Description

@mehmetc

OpenSSL::PKey.read throws a null pointer exception when reading an encrypted key. I found an old Jira entry if it helps.

require 'openssl'
require 'open-uri'

pass = "secure-password!42"
cert = open('https://raw.githubusercontent.com/savonrb/savon/master/spec/fixtures/ssl/client_encrypted_key.pem') {|f| f.read}

r = OpenSSL::PKey.read(cert, pass)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions