requests_pkcs12 | Add PKCS # 12 support to the Python requests | TLS library

 by   m-click Python Version: 1.14 License: ISC

kandi X-RAY | requests_pkcs12 Summary

kandi X-RAY | requests_pkcs12 Summary

requests_pkcs12 is a Python library typically used in Security, TLS applications. requests_pkcs12 has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install requests_pkcs12' or download it from GitHub, PyPI.

Add PKCS#12 support to the Python requests library in a clean way, without monkey patching or temporary files
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              requests_pkcs12 has a low active ecosystem.
              It has 99 star(s) with 26 fork(s). There are 7 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 22 have been closed. On average issues are closed in 120 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of requests_pkcs12 is 1.14

            kandi-Quality Quality

              requests_pkcs12 has 0 bugs and 1 code smells.

            kandi-Security Security

              requests_pkcs12 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              requests_pkcs12 code analysis shows 0 unresolved vulnerabilities.
              There are 1 security hotspots that need review.

            kandi-License License

              requests_pkcs12 is licensed under the ISC License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              requests_pkcs12 releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              requests_pkcs12 saves you 59 person hours of effort in developing the same functionality from scratch.
              It has 213 lines of code, 15 functions and 2 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed requests_pkcs12 and discovered the below as its top functions. This is intended to give you an instant insight into requests_pkcs12 implemented functionality, and help decide if they suit your requirements.
            • Generates a SSL certificate
            • Wrapper for requests
            • Handle GET requests
            • Create an SSL context
            • Raise a ValueError if the client certificate has not expired
            • Creates a PyOpenSSL context
            • Handles HEAD requests
            • Handler for OPTIONS requests
            • Generic DELETE method
            • Make a patch request
            • Makes a POST request
            • Make a PUT request
            Get all kandi verified functions for this library.

            requests_pkcs12 Key Features

            No Key Features are available at this moment for requests_pkcs12.

            requests_pkcs12 Examples and Code Snippets

            HTTPS connection using PFX Certificate Thumbprint
            Pythondot img1Lines of Code : 4dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            from requests_pkcs12 import get
            
            r = get('https://example.com/test', pkcs12_filename='clientcert.p12',  pkcs12_password='correcthorsebatterystaple')
            

            Community Discussions

            QUESTION

            Should I use a session with p12-certificate
            Asked 2020-Jul-04 at 06:29

            So I've writren a scraper that uses the requests_pkcs12-library and a .p12-cert.

            Currently I'm making a lot a requests where I use it as described in the docs

            ...

            ANSWER

            Answered 2020-Jul-04 at 06:29

            Yes, using a session may improve performance on client-side and reduce the server-side load as well.

            Note that this has almost nothing to do with the requests_pkcs12 library, but is a generic mechanism of the requests library.

            The requests manual states:

            The Session object allows you to persist certain parameters across requests. It also persists cookies across all requests made from the Session instance, and will use urllib3’s connection pooling. So if you’re making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase (see HTTP persistent connection).

            The linked Wikipedia entry for HTTP persistent connection states:

            Advantages

            • ...
            • Reduced CPU usage and round-trips because of fewer new connections and TLS handshakes.

            And the Wikipedia section on TLS handshakes states:

            Client-authenticated TLS handshake

            ...

            1. Negotiation Phase:
              • ...
              • The server sends a CertificateRequest message, to request a certificate from the client so that the connection can be mutually authenticated.
              • ...
              • The client responds with a Certificate message, which contains the client's certificate.

            To summarize, using a requests session leads to connection pooling which leads to fewer TCP connections and hence fewer TLS handshakes, which in turn means fewer client certificate authentications. Note that this is independent on how the client certificate was made available to requests, whether in PKCS12 format (using requests_pkcs12) or PEM format (using plain requests).

            Source https://stackoverflow.com/questions/62718353

            QUESTION

            URLLib with cert SSLv3 alert handshake failure
            Asked 2020-Jan-30 at 00:59

            I'm using Python 3.7.3 and the requests_pkcs12 library to scrape a website where I must pass a certificate and password, then download and extract zip files from links on the page. I've got the first part working fine. But when I try to read the files using urllib, I get an error.

            ...

            ANSWER

            Answered 2020-Jan-30 at 00:59

            Answer was to not use urllib and instead use the same requests replacement that allows a pfx and password passed to it.

            Last 2 lines:

            Source https://stackoverflow.com/questions/59940613

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install requests_pkcs12

            You can install using 'pip install requests_pkcs12' or download it from GitHub, PyPI.
            You can use requests_pkcs12 like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/m-click/requests_pkcs12.git

          • CLI

            gh repo clone m-click/requests_pkcs12

          • sshUrl

            git@github.com:m-click/requests_pkcs12.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular TLS Libraries

            mkcert

            by FiloSottile

            v2rayN

            by 2dust

            acme.sh

            by acmesh-official

            nginxconfig.io

            by digitalocean

            v2ray

            by 233boy

            Try Top Libraries by m-click

            mcpdf

            by m-clickJava

            jsontyping

            by m-clickPython