• Simo Sorce's avatar
    Add helpers to test and export specific key forms · 9282e1e9
    Simo Sorce authored
    New test properties are:
    - is_symmetric
        True if key is symmetric (kty=oct) otherwise False
    - has_private
        True if the key is not symmetric and the key has values
        marked 'Private' according to the JWKValuesRegistry
    - has_public
        True if the key is not symmetric and the key has values
        marked 'Public' according to the JWKValuesRegistry
    
    New export helpers are:
    - export_private()
        Succeeds only if the key 'has_private'
    
    - export_symmetric()
        Succeeds only if the key 'is_symmetric'
    
    Un-deprecates export_public() but adds checks to make it fail if
    'has_public' returns False
    
    Adds tests.
    Signed-off-by: 's avatarSimo Sorce <simo@redhat.com>
    Closes #45
    9282e1e9
Name
Last commit
Last update
docs Loading commit data...
jwcrypto Loading commit data...
.coveragerc Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
LICENSE Loading commit data...
MANIFEST.in Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
requirements.txt Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...
tox.ini Loading commit data...