Skip to content

Commit

Permalink
Documentation updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
hbldh committed Apr 8, 2016
1 parent 6c1cf74 commit 0690353
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ The ``collect`` should be used sparingly, as not to burden the server unnecessar
Python 2, urllib3 and certificate verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

An `InsecurePlatformWarning` is issued when using the client in Python 2 (See
An ``InsecurePlatformWarning`` is issued when using the client in Python 2 (See
`urllib3 documentation <https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning>`_).
This can be remedied by installing pyopenssl according to
This can be remedied by installing ``pyopenssl`` according to
`this issue <https://github.com/kennethreitz/requests/issues/749>`_ and
`docstrings in requests <https://github.com/kennethreitz/requests/blob/master/requests/packages/urllib3/contrib/pyopenssl.py>`_.

Optionally, the environment variable `PYBANKID_DISABLE_WARNINGS` can be set to disable these warnings.
Optionally, the environment variable ``PYBANKID_DISABLE_WARNINGS`` can be set to disable these warnings.

Testing
-------
Expand Down
2 changes: 1 addition & 1 deletion bankid/testcert.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def split_test_cert_and_key():
stderr=subprocess.PIPE)
p.communicate()

# Open the newly created PEM certificate in the temporary folder.
# Open the newly created PEM certificate and key in the temporary folder.
with open(cert_conv_tmp_path, 'rt') as f:
certificate = f.read()
with open(key_conv_tmp_path, 'rt') as f:
Expand Down
2 changes: 1 addition & 1 deletion docs/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BankID Client
=============


The client and the transport class using requests.

.. automodule:: bankid.client
:members:
11 changes: 11 additions & 0 deletions docs/testcert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
Test Certificate methods
========================

There is a test certificate available on `BankID Technical Information webpage
<https://www.bankid.com/bankid-i-dina-tjanster/rp-info>`_, which can be used for
testing authorization and signing. The methods in the :py:mod:`bankid.testcert`
module fetches that test certificate, splits it into one certificate and one key part and
converts it from `pxf <https://en.wikipedia.org/wiki/PKCS_12>`_ format to
`pem <https://en.wikipedia.org/wiki/X.509#Certificate_filename_extensions>`_.

.. note::
It also removes the password from the private key in the certificate,
which is a requirement for using the PyBankID package in an automated way.

.. automodule:: bankid.testcert
:members:

11 changes: 11 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,14 @@ with the ``collect`` method using the received ``orderRef``:
u'surname': u'Namnsson'}}
The ``collect`` should be used sparingly, as not to burden the server unnecessarily.

Python 2, urllib3 and certificate verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

An ``InsecurePlatformWarning`` is issued when using the client in Python 2 (See
`urllib3 documentation <https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning>`_).
This can be remedied by installing ``pyopenssl`` according to
`this issue <https://github.com/kennethreitz/requests/issues/749>`_ and
`docstrings in requests <https://github.com/kennethreitz/requests/blob/master/requests/packages/urllib3/contrib/pyopenssl.py>`_.

Optionally, the environment variable ``PYBANKID_DISABLE_WARNINGS`` can be set to disable these warnings.

0 comments on commit 0690353

Please sign in to comment.