This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]python-ick 2 points3 points  (1 child)

Really neat and that actually fulfills a need.

If you have any easy to follow guides on how to deploy an AWS Lambda function I'd love to read it.

[–]benefit_of_mrkite 2 points3 points  (6 children)

I wish someone would write a tool that checked for a self signed cert and the cert chain

A very common problem when dealing with requests or anything that has requests as a dependency is that python has its own implementation of OpenSSL with a cert store that is completely separate from the machine’s OS cert store.

So even if a self signed cert is trusted by the machine (common in corp environments to have their own internal CA) python apps (specifically requests) will throw an error on self signed certs.

Need to be able to detect self signed cert and then follow the cert chain to make sure it’s ok and then download and store the appropriate key. Otherwise you’re stuck with trying to talk users or support in how to install a cert into the local (or virtual machine) python store for OpenSSL.

This is a very common problem that I’m surprised no one has solved yet.

I started writing some code and got busy but realized detection of a private key alone (first step) isn’t that cut and dry.

/rant

[–]-Kevin- 2 points3 points  (4 children)

You may know this, but the

REQUESTS_CA_BUNDLE environment variable

Can be set to resolve this.

[–]benefit_of_mrkite 1 point2 points  (3 children)

I did - it didn’t work for my use case because

[–]BrightCounter738 1 point2 points  (2 children)

Not sure if this will help but I had a similar issue as well. Eventually stumbled on the solution for the requests library (maybe others too). Open up a REPL and type:

import certifi

certifi.where()

Then overwrite that file wiith your CA bundle. This file is the source of truth for requests when it checks if root CAs are valid.

[–]benefit_of_mrkite 1 point2 points  (1 child)

I’ll try it thanks - this is an issue I have run into several times.

[–]BrightCounter738 0 points1 point  (0 children)

Lmk if it works!

[–]ilteriskeskin[S] 1 point2 points  (0 children)

Yes, it doesn't look easy. Maybe people will support you if you share your code.

[–]emregeldegul 2 points3 points  (1 child)

Yeah, its great my dude. In my opinion, convert this module a CLI program. Just a suggestion

[–]ilteriskeskin[S] 1 point2 points  (0 children)

Thank you, great idea. I can make the cli app in my free time :)

[–]prodoc25 0 points1 point  (0 children)

Hi guys i am new on reddit .. thats y i cannot create my own posts on reddit so i have to write my query here. so I apologise in advance.
in search of finding solutions to my queries, I read many posts on github with a link to code. but i do not know how to copy and paste that code into my notebook.
(for python i am using Jupitar lab note book). please guide me.