cirospaciari / socketify.py

Bringing Http/Https and WebSockets High Performance servers for PyPy3 and Python3
https://www.socketify.dev
MIT License
1.44k stars 55 forks source link

SSL Verify Options #178

Open wedobetter opened 5 months ago

wedobetter commented 5 months ago

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like Make use of standard ssl verify options ssl.CERT_NONE ssl.CERT_OPTIONAL ssl.CERT_REQUIRED

Additional context Allow for standard SSL client authentication options

Example:

import ssl

from socketing import App, AppOptions

app = App(
    AppOptions(
        ca_file_name="ssl/certs/ca.crt",
        key_file_name="ssl/private/server.key",
        cert_file_name="ssl/certs/server.crt",
        passphrase="password",
        dh_params_file_name="ssl/private/dh.pem"
        ssl_verify=ssl.CERT_REQUIRED
    )
)

Thank you

cirospaciari commented 3 months ago

I wanna to add all nodejs options to AppOptions https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions I think this is required to socketify be production grade.