Skip to content

Commit 07019ce

Browse files
committed
Missed commit
1 parent 8a51358 commit 07019ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/ruby_saml/utils.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def format_private_key(key, multi: false)
119119
# @param pem [String] The original certificate
120120
# @return [OpenSSL::X509::Certificate] The certificate object
121121
def build_cert_object(pem)
122+
return pem if pem.is_a?(OpenSSL::X509::Certificate)
122123
return unless (pem = PemFormatter.format_cert(pem, multi: false))
123124

124125
OpenSSL::X509::Certificate.new(pem)
@@ -129,6 +130,7 @@ def build_cert_object(pem)
129130
# @param pem [String] The original private key.
130131
# @return [OpenSSL::PKey::PKey] The private key object.
131132
def build_private_key_object(pem)
133+
return pem if pem.is_a?(OpenSSL::PKey::PKey)
132134
return unless (pem = PemFormatter.format_private_key(pem, multi: false))
133135

134136
error = nil

0 commit comments

Comments
 (0)