Re: ssl server: how to disable client cert verfication?

2022-02-03 Thread Kushal Kumaran
On Thu, Feb 03 2022 at 01:32:04 PM, Grant Edwards wrote: > On 2022-02-03, Kushal Kumaran wrote: > >> On Thu, Feb 03 2022 at 10:57:56 AM, Grant Edwards >> wrote: >>> I've got a small ssl server app. I want to require a certificate from >>> the client, so I'm using a context with >>> >>> context

Re: ssl server: how to disable client cert verfication?

2022-02-03 Thread Chris Angelico
On Fri, 4 Feb 2022 at 09:37, Grant Edwards wrote: > I've looked through the ssl.Context documentation multiple times, and > haven't been able to spot any option or flag that disables client > certificate validation or allows the user to override the actual > client certificate validation process.

Re: Pypy with Cython

2022-02-03 Thread Oscar Benjamin
On Thu, 3 Feb 2022 at 23:16, Greg Ewing wrote: > > On 4/02/22 5:07 am, Albert-Jan Roskam wrote: > > On Feb 3, 2022 17:01, Dan Stromberg wrote: > > > > What profiler do you recommend > > If it runs for that long, just measuring execution time should > be enough. Python comes with a "timeit

Re: Pypy with Cython

2022-02-03 Thread Greg Ewing
On 4/02/22 5:07 am, Albert-Jan Roskam wrote: On Feb 3, 2022 17:01, Dan Stromberg wrote: What profiler do you recommend If it runs for that long, just measuring execution time should be enough. Python comes with a "timeit" module to help with that, or you can use whatever your OS provi

Re: Waht do you think about my repeated_timer class

2022-02-03 Thread Cecil Westerhof via Python-list
Barry writes: >> On 3 Feb 2022, at 04:45, Cecil Westerhof via Python-list >> wrote: >> >> Have to be careful that timing keeps correct when target takes a 'lot' >> of time. >> Something to ponder about, but can wait. > > You have noticed that your class does call the function at the repeat >

Re: ssl server: how to disable client cert verfication?

2022-02-03 Thread Grant Edwards
On 2022-02-03, Barry wrote: > >> [...] I just want to require that the client provide a certificate >> and then print it out using print(connection.getpeercert()) > > I am not near the pc with the code on. But in outline you provide a > ssl context that returns true for the validation of the cert

Re: ssl server: how to disable client cert verfication?

2022-02-03 Thread Barry
> On 3 Feb 2022, at 21:34, Grant Edwards wrote: > > On 2022-02-03, Kushal Kumaran wrote: > >>> On Thu, Feb 03 2022 at 10:57:56 AM, Grant Edwards >>> wrote: >>> I've got a small ssl server app. I want to require a certificate from >>> the client, so I'm using a context with >>> >>> context

Re: Waht do you think about my repeated_timer class

2022-02-03 Thread Barry
> On 3 Feb 2022, at 04:45, Cecil Westerhof via Python-list > wrote: > > Have to be careful that timing keeps correct when target takes a 'lot' > of time. > Something to ponder about, but can wait. You have noticed that your class does call the function at the repeat interval but rather at t

Re: ssl server: how to disable client cert verfication?

2022-02-03 Thread Grant Edwards
On 2022-02-03, Kushal Kumaran wrote: > On Thu, Feb 03 2022 at 10:57:56 AM, Grant Edwards > wrote: >> I've got a small ssl server app. I want to require a certificate from >> the client, so I'm using a context with >> >> context.verify_mode = ssl.CERT_REQUIRED >> >> But, I want all certificates

Re: ssl: why wrap newly accept()ed connections?

2022-02-03 Thread Grant Edwards
On 2022-02-03, Kushal Kumaran wrote: > >> [...] >> However, example server code I've found does not wrap the newly >> accepted connection. I've checked, and newsocket is already an >> object. [...] >> >> What is the purpose of wrapping newsocket? > > That section is talking about using an "ordina

Re: ssl server: how to disable client cert verfication?

2022-02-03 Thread Kushal Kumaran
On Thu, Feb 03 2022 at 10:57:56 AM, Grant Edwards wrote: > I've got a small ssl server app. I want to require a certificate from > the client, so I'm using a context with > > context.verify_mode = ssl.CERT_REQUIRED > > But, I want all certificates accepted. How do I disable client > certificate v

Re: ssl: why wrap newly accept()ed connections?

2022-02-03 Thread Kushal Kumaran
On Thu, Feb 03 2022 at 11:17:17 AM, Grant Edwards wrote: > According to the docs, when you accept() an ssl connection, > you need to wrap the new connection: > > https://docs.python.org/3/library/ssl.html?highlight=ssl#ssl-sockets > >When a client connects, you’ll call accept() on the socket

ssl: why wrap newly accept()ed connections?

2022-02-03 Thread Grant Edwards
According to the docs, when you accept() an ssl connection, you need to wrap the new connection: https://docs.python.org/3/library/ssl.html?highlight=ssl#ssl-sockets When a client connects, you’ll call accept() on the socket to get the new socket from the other end, and use the context’s

ssl server: how to disable client cert verfication?

2022-02-03 Thread Grant Edwards
I've got a small ssl server app. I want to require a certificate from the client, so I'm using a context with context.verify_mode = ssl.CERT_REQUIRED But, I want all certificates accepted. How do I disable client certificate verification? -- Grant -- https://mail.python.org/mailman/listinfo/

Re: Pypy with Cython

2022-02-03 Thread Albert-Jan Roskam
On Feb 3, 2022 17:01, Dan Stromberg wrote: > The best answer to "is this slower on > Pypy" is probably to measure. > Sometimes it makes sense to rewrite C > extension modules in pure python for pypy. Hi Dan, thanks. What profiler do you recommend I normally us

Re: Pypy with Cython

2022-02-03 Thread Dan Stromberg
The best answer to "is this slower on Pypy" is probably to measure. Sometimes it makes sense to rewrite C extension modules in pure python for pypy. On Thu, Feb 3, 2022 at 7:33 AM Albert-Jan Roskam wrote: >Hi, >I inherited a fairly large codebase that I need to port to Python 3. > Since

Pypy with Cython

2022-02-03 Thread Albert-Jan Roskam
Hi, I inherited a fairly large codebase that I need to port to Python 3. Since the program was running quite slow I am also running the unittests against pypy3.8. It's a long running program that does lots of pairwise comparisons of string values in two files. Some parts of the progr

A Short Survey To Understand Practitioner' Perspectives Towards The Requirements Engineering

2022-02-03 Thread ETEM ÇETİN TOPTANİ
Dear Sir or Madam, We prepared a short survey to understand practitioners’ perspectives towards the requirements engineering. Our survey basically aims to clarify on many aspects of the requirements engineering applied in industry, including (i) requirements gathering and specifications, (ii) req

Re: Waht do you think about my repeated_timer class

2022-02-03 Thread Albert-Jan Roskam
On Feb 2, 2022 23:31, Barry wrote: > On 2 Feb 2022, at 21:12, Marco Sulla wrote: > > You could add a __del__ that calls stop :) Didn't python3 make this non deterministic when del is called? I thought the recommendation is to not rely on __del__ in python3 code

Re: Waht do you think about my repeated_timer class

2022-02-03 Thread 2QdxY4RzWzUUiLuE
On 2022-02-03 at 05:52:19 +0100, Cecil Westerhof via Python-list wrote: > 2qdxy4rzwzuui...@potatochowder.com writes: > > > FWIW, I'd find some way to tell users the units (seconds, milliseconds, > > fortnights, etc.) instead of making them wade through your code to find > > the call to (and poss