Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow format_cert to work with chained certificates #423

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

samsonnguyen
Copy link

@samsonnguyen samsonnguyen commented Nov 17, 2017

When presented with a chained certificate, Util.format_cert improperly formats the certificate causing the chained certs to combine together.

OpenSSL::X509::Certificate.new(OneLogin::RubySaml::Utils.format_cert(chained_cert))
OpenSSL::X509::CertificateError: nested asn1 error

Steps to Test or Reproduce:

  • Create a chained certificate file using openssl
  • call OneLogin::RubySaml::Utils.format_cert(your_chained_certificate) and examine the output
  • The output will show as one single certificate, and additionally cause an error when attempting to load using OpenSSL::X509::Certificate.new()

Expectation:

  • Chained certificates get formatted correctly
  • Single certificates get formatted correctly
  • formatted chained certificate can be imported into openssl

@pitbulk pitbulk merged commit 8923834 into SAML-Toolkits:master Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants