Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hbldh committed Dec 15, 2023
2 parents 52e33f7 + e7eb228 commit cab407b
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 18 deletions.
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: requirements-dev.txt
- method: pip
path: .
2 changes: 1 addition & 1 deletion bankid/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
Version info
"""

__version__ = "0.14.0"
__version__ = "0.14.1"
version = __version__ # backwards compatibility name
Binary file added bankid/certs/FPTestcert4_20230629.p12
Binary file not shown.
32 changes: 32 additions & 0 deletions bankid/certs/FPTestcert4_20230629_cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Bag Attributes
localKeyID: A9 F3 0C D7 04 B6 7D 23 86 84 71 C3 E9 42 62 8B 1B D7 75 C3
subject=C = SE, O = Testbank A AB (publ), serialNumber = 5566304928, name = Test av BankID, CN = FP Testcert 4
issuer=C = SE, O = Testbank A AB (publ), serialNumber = 111111111111, CN = Testbank A RP CA v1 for BankID Test
-----BEGIN CERTIFICATE-----
MIIEyjCCArKgAwIBAgIIMLbIMaRHjMMwDQYJKoZIhvcNAQELBQAwcTELMAkGA1UE
BhMCU0UxHTAbBgNVBAoMFFRlc3RiYW5rIEEgQUIgKHB1YmwpMRUwEwYDVQQFEwwx
MTExMTExMTExMTExLDAqBgNVBAMMI1Rlc3RiYW5rIEEgUlAgQ0EgdjEgZm9yIEJh
bmtJRCBUZXN0MB4XDTIyMDgxNzIyMDAwMFoXDTI0MDgxODIxNTk1OVowcjELMAkG
A1UEBhMCU0UxHTAbBgNVBAoMFFRlc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jcObBCr2e4uuU+
CLENcretUAv0BtCsOBhQLXZ0qzqrgsVebTRQzm2zTM0yfBpcTtPd3MOMFeMQTHJJ
8QH6twAKeJfY1lUCTXJYy1ZcrKnrNehksST8tk98Km9t5M2X59QZk7mJzzsUbnWr
t+izid7xF7FAgDYj9XJgQHz04a4RjRSw5/6dgexAgvGoeOkG7uUhYd5DEYQCyQyR
Zy69pJN32L0nM2dC2e3NFU5BOBwocoKza3hdtSqqvIkj2kzyeU38uaJUco/Vk3OU
s+sQNZbk5C1pxkLLwzu815tKg77Om4Nwbi+bgDvI
-----END CERTIFICATE-----
31 changes: 31 additions & 0 deletions bankid/certs/FPTestcert4_20230629_key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Bag Attributes
localKeyID: A9 F3 0C D7 04 B6 7D 23 86 84 71 C3 E9 42 62 8B 1B D7 75 C3
Key Attributes: <No Attributes>
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC+C/BERzUouyaY
fYI+GoeyHqJOZWR2WzcltQIiSdTn3g9ZWwM8UonbU7ujXwvN88Qoy6tPdZR2ORu3
aTQ7dazeWPo0L67XC3PJ1KYKi3xFJ2xis2Wh5Tve44eqajvJ4/5mpU61iO9Ba+kj
t0sW7IMbsCV5UVAEMSNJj7w9YDnfrspgPhKnWEt/YowtniAh0n+21ML5rHMvEwMh
HE+BmJnI2otb2yI5YXppgL/jSiYkqQ/s6r7hxiMwZu9fxXenEwF6pB5Kk5SbMRdp
unqIygn3JubgL0k14VWxjNeecJqcy7JM5ENHcei20TbQPgQ3tTLAAL/GhNhUNI99
QC4GXj2NAgMBAAECggEBAKiJH9b9Kxhm9/BNhZ4bmvEMF7XcVv5bIAnRfwX3YdcK
Z6Q/gRwSumyF0iYsmORY5EGldNOvmyxIstqxcn+0eMxqLeDv1Gaioll/uowpbNhL
AOR64Yt0Jecg8mPfeAwvo6FVwfpdaIgk8YkZ+H5o2lB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3m8w7INgsjxQy/U=
-----END PRIVATE KEY-----
6 changes: 3 additions & 3 deletions bankid/certs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@


def get_test_cert_p12():
return (Path(__file__).parent / "FPTestcert4_20220818.p12").resolve()
return (Path(__file__).parent / "FPTestcert4_20230629.p12").resolve()


def get_test_cert_and_key():
return (
(Path(__file__).parent / "FPTestcert4_20220818_cert.pem").resolve(),
(Path(__file__).parent / "FPTestcert4_20220818_key.pem").resolve(),
(Path(__file__).parent / "FPTestcert4_20230629_cert.pem").resolve(),
(Path(__file__).parent / "FPTestcert4_20230629_key.pem").resolve(),
)
1 change: 0 additions & 1 deletion bankid/certutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from bankid.exceptions import BankIDError

_TEST_CERT_PASSWORD = "qwerty123"
_TEST_CERT_URL = "https://www.bankid.com/assets/bankid/rp/FPTestcert4_20220818.p12"


def create_bankid_test_server_cert_and_key(destination_path):
Expand Down
16 changes: 8 additions & 8 deletions bankid/jsonclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def authenticate(self, end_user_ip, personal_number=None, requirement=None, **kw
.. code-block:: json
{
'orderRef': 'ee3421ea-2096-4000-8130-82648efe0927',
'autoStartToken': 'e8df5c3c-c67b-4a01-bfe5-fefeab760beb',
'qrStartToken': '01f94e28-857f-4d8a-bf8e-6c5a24466658',
'qrStartSecret': 'b4214886-3b5b-46ab-bc08-6862fddc0e06'
"orderRef": "ee3421ea-2096-4000-8130-82648efe0927",
"autoStartToken": "e8df5c3c-c67b-4a01-bfe5-fefeab760beb",
"qrStartToken": "01f94e28-857f-4d8a-bf8e-6c5a24466658",
"qrStartSecret": "b4214886-3b5b-46ab-bc08-6862fddc0e06"
}
:param end_user_ip: IP address of the user requesting
Expand Down Expand Up @@ -131,10 +131,10 @@ def sign(
.. code-block:: json
{
'orderRef': 'ee3421ea-2096-4000-8130-82648efe0927',
'autoStartToken': 'e8df5c3c-c67b-4a01-bfe5-fefeab760beb',
'qrStartToken': '01f94e28-857f-4d8a-bf8e-6c5a24466658',
'qrStartSecret': 'b4214886-3b5b-46ab-bc08-6862fddc0e06'
"orderRef": "ee3421ea-2096-4000-8130-82648efe0927",
"autoStartToken": "e8df5c3c-c67b-4a01-bfe5-fefeab760beb",
"qrStartToken": "01f94e28-857f-4d8a-bf8e-6c5a24466658",
"qrStartSecret": "b4214886-3b5b-46ab-bc08-6862fddc0e06"
}
:param end_user_ip: IP address of the user requesting
Expand Down
14 changes: 10 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

import sys
import os
import re
import pathlib

_version = {}
_version_file = pathlib.Path(__file__).parent.parent / "bankid" / "__version__.py"
exec(_version_file.read_text(encoding="utf-8"), _version)

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -51,17 +57,17 @@

# General information about the project.
project = "PyBankID"
copyright = "2018, Henrik Blidh"
copyright = "2023, Henrik Blidh"
author = "Henrik Blidh"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = "0.7.0"
version = _version['__version__']
# The full version, including alpha/beta/rc tags.
release = "0.7.0"
release = _version['__version__']

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -113,7 +119,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.

# html_theme = "sphinx_rtd_theme"
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
4 changes: 3 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pytest
pytest
sphinx
sphinx-rtd-theme

0 comments on commit cab407b

Please sign in to comment.