psf / psf/requests

Client certificates AND self-signed

Open
#5,103 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
54.3k
Forks
10.4k
Avg merge
16h 43m
Merged PRs (30d)
3

Description

I have read many posts about the issues separately, and the only ones that work are the ones setting the verification as "False".

Is it possible to use both verify and cert?

This raises error

session.verify = 'server.pem'
session.cert = ('public.pem', 'private.pem')

Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert certificate unknown')])")))

Whereas this works:

session.verify = False
session.cert = ('public.pem', 'private.pem')

And this works:

session.verify = 'server.pem'
#session.cert = ('public.pem', 'private.pem')

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

Start by reproducing the shown Session configuration with verify set to server.pem and cert set to the public/private pair. Investigate the TLS handshake failure and determine whether simultaneous server verification and client certificates are supported; done means the behavior is fixed or clearly documented, with coverage for the working and failing configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.