Skip to content

Commit 06c9e5f

Browse files
authored
Merge branch 'main' into x509_test_vector
2 parents 4e6311f + abe1f20 commit 06c9e5f

22 files changed

+449
-322
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ develop ]
16+
branches: [ main ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ develop ]
19+
branches: [ main ]
2020
schedule:
2121
- cron: '22 14 * * 2'
2222

.github/workflows/test.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ jobs:
1010
strategy:
1111
matrix:
1212
python-version:
13-
- 3.6
14-
- 3.7
15-
- 3.8
16-
- 3.9
13+
- "3.6"
14+
- "3.7"
15+
- "3.8"
16+
- "3.9"
17+
- "3.10"
1718
steps:
1819
- uses: actions/checkout@v2
1920
- name: Set up Python ${{ matrix.python-version }}
@@ -33,6 +34,8 @@ jobs:
3334
run: |
3435
pip install poetry
3536
poetry config virtualenvs.in-project true
37+
- name: Python 3.10 workaround
38+
run: poetry config experimental.new-installer false
3639
- name: Install dependencies
3740
run: poetry install
3841
- name: Run pytest

doc/jwe.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ There is a lower level way of doing the same, it will look like this::
4343
>>> from cryptojwt.jwk.rsa import import_private_rsa_key_from_file
4444
>>> from cryptojwt.jwe.jwe_rsa import JWE_RSA
4545

46-
>>> priv_key = import_private_rsa_key_from_file(KEY)
46+
>>> priv_key = import_private_rsa_key_from_file('certs/key.pem')
4747
>>> pub_key = priv_key.public_key()
4848
>>> plain = b'Now is the time for all good men to come to the aid of ...'
49-
>>> _rsa = JWE_RSA(plain, alg="RSA1_5", enc="A128CBC-HS256")
49+
>>> _rsa = JWE_RSA(plain, alg="RSA-OAEP", enc="A128CBC-HS256")
5050
>>> jwe = _rsa.encrypt(pub_key)
5151

5252
Here the key is an cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey
@@ -61,7 +61,7 @@ Decrypting using the encrypted message above.
6161
>>> from cryptojwt.jwe.jwe import factory
6262
>>> from cryptojwt.jwk.rsa import RSAKey
6363

64-
>>> _decryptor = factory(jwe, alg="RSA1_5", enc="A128CBC-HS256")
64+
>>> _decryptor = factory(jwe, alg="RSA-OAEP", enc="A128CBC-HS256")
6565
>>> _dkey = RSAKey(priv_key=priv_key)
6666
>>> msg = _decryptor.decrypt(jwe, [_dkey])
6767

0 commit comments

Comments
 (0)