jnunemaker / jnunemaker/httparty

Question: How to verify server certificate?

Open
#591 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.