jnunemaker / jnunemaker/httparty
Question: How to verify server certificate?
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 5.9k
- Forks
- 973
- Avg merge
- 1h 59m
- Merged PRs (30d)
- 1
Description
I am newbie on SSL concept, I am trying to connect to API which have x509 mutual auth. I got client cert, client key and server cert. All are pem files. I got it working with client cert and key and with verify: false. Now next step is how to verify server cert also?
include HTTParty
DEFAULT_HEADERS = {
'Content-Type' => 'application/json'
}.freeze
base_uri ENV.fetch('SERVICE')
pem "#{Base64.decode64(ENV.fetch('CLIENT_CERT'))}#{Base64.decode64(ENV.fetch('CLIENT_KEY'))}\n"
def self.iframe_url(**payload)
post(
'/test/create',
body: payload.to_json,
headers: DEFAULT_HEADERS,
verify: false
)
end
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the iframe_url entry point and its pem and verify: false options, then locate HTTParty's SSL/TLS configuration documentation or tests. Done means the issue has a documented, reproducible path for verifying the server certificate alongside the existing mutual-TLS setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- networking, security
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100