artifactory-client icon indicating copy to clipboard operation
artifactory-client copied to clipboard

Client::request did not load X509 cert correctly

Open ralian opened this issue 8 months ago • 2 comments

When loading a custom X509 cert in Client::request, the gem attempted to call OpenSSL::PKey::RSA.new with the raw content of the key file which either no longer works or never worked.

Description

Simply assign the RSA key by using the OpenSSL gem's built in member OpenSSL::X509::Certificate::public_key instead of calling OpenSSL::PKey::RSA.new.

Related Issue

#172

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • [x] I have read the CONTRIBUTING document.
  • [ ] I have run the pre-merge tests locally and they pass.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [ ] If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • [ ] All new and existing tests passed.
  • [ ] All commits have been signed-off for the Developer Certificate of Origin.

ralian avatar Jun 14 '24 19:06 ralian