Skip to content

Commit fb73793

Browse files
authored
Merge branch 'main' into utcnow
2 parents ce483bf + 602ff41 commit fb73793

25 files changed

+732
-687
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: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,29 @@ on:
55
- pull_request
66

77
jobs:
8+
pre_job:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
12+
steps:
13+
- id: skip_check
14+
uses: fkirc/skip-duplicate-actions@master
15+
with:
16+
do_not_skip: '["pull_request"]'
17+
cancel_others: 'true'
18+
concurrent_skipping: same_content
819
test:
20+
needs: pre_job
21+
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
922
runs-on: ubuntu-latest
1023
strategy:
1124
matrix:
1225
python-version:
13-
- 3.6
14-
- 3.7
15-
- 3.8
16-
- 3.9
26+
- "3.6"
27+
- "3.7"
28+
- "3.8"
29+
- "3.9"
30+
- "3.10"
1731
steps:
1832
- uses: actions/checkout@v2
1933
- name: Set up Python ${{ matrix.python-version }}
@@ -33,6 +47,8 @@ jobs:
3347
run: |
3448
pip install poetry
3549
poetry config virtualenvs.in-project true
50+
- name: Python 3.10 workaround
51+
run: poetry config experimental.new-installer false
3652
- name: Install dependencies
3753
run: poetry install
3854
- 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)