Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKCS11 testing with SoftHSM2 #805

Merged
merged 38 commits into from
Sep 3, 2023
Merged

PKCS11 testing with SoftHSM2 #805

merged 38 commits into from
Sep 3, 2023

Commits on Aug 28, 2023

  1. Configuration menu
    Copy the full SHA
    fea9dcc View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2023

  1. Configuration menu
    Copy the full SHA
    6a554cc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7db579d View commit details
    Browse the repository at this point in the history
  3. - Fixed license headers for newly generated test key files

    - removed conditional check for X448 and X25519 certificate/chains now that we have signed certs for those test key files
    lhazlewood committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    bac3328 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    109116e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a7ed853 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6f652a6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9c9e41a View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2023

  1. Configuration menu
    Copy the full SHA
    3e76221 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f86b9f7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e375d03 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    19a5ef6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    35b8127 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    23d3cd3 View commit details
    Browse the repository at this point in the history
  7. - moved softhsmimport to impl/src/test/scripts/softhsm and refactored…

    … to support 'import' and 'configure' subcommands
    lhazlewood committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    a267170 View commit details
    Browse the repository at this point in the history
  8. - minor scope fix

    lhazlewood committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    10c7c15 View commit details
    Browse the repository at this point in the history
  9. - minor scope fix

    lhazlewood committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    dc5c91f View commit details
    Browse the repository at this point in the history
  10. - minor scope fix

    lhazlewood committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    ac0d053 View commit details
    Browse the repository at this point in the history
  11. - minor scope fix

    lhazlewood committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    19ce1aa View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    3f1580b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3ab2518 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    94aa576 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    37fee95 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    0f2e700 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2023

  1. - PKCS11 testing cleanup

    - Added new Curve#contains method and leveraged that to clean up code considerably in EcdhKeyAlgorithm.java
    lhazlewood committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    8e4eb2b View commit details
    Browse the repository at this point in the history
  2. - Moved Curve#contains method to AbstractCurve since we don't necessa…

    …rily want to make that available before ED curve calculations are ready
    lhazlewood committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    26f31ce View commit details
    Browse the repository at this point in the history
  3. - Updated Pkcs11Test to account for nested ProviderExceptions that we…

    … can't control across JVM versions w/ SoftHSM
    lhazlewood committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    9965456 View commit details
    Browse the repository at this point in the history
  4. - renamed Keys#associate to Keys#wrap to be a little clearer on what'…

    …s happening
    
    - Updated README.md to document how to account for ECDH-ES and PKCS11 PrivateKeys
    lhazlewood committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    59bf3c6 View commit details
    Browse the repository at this point in the history
  5. - renamed Keys#associate to Keys#wrap to be a little clearer on what'…

    …s happening
    
    - Updated README.md to document how to account for ECDH-ES and PKCS11 PrivateKeys
    lhazlewood committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    cfc0579 View commit details
    Browse the repository at this point in the history
  6. - renamed Keys#associate to Keys#wrap to be a little clearer on what'…

    …s happening
    
    - Updated README.md to document how to account for ECDH-ES and PKCS11 PrivateKeys
    lhazlewood committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    4afa451 View commit details
    Browse the repository at this point in the history
  7. - Updated softhsm script to ensure EC key import used the pkcs11-tool…

    … `--usage-derive` flag to allow testing PKCS11 keys with ECDH-ES key algorithms
    lhazlewood committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    a4d7ae4 View commit details
    Browse the repository at this point in the history
  8. - Renamed CryptoAlgorithm#generateKey to #generateCek to be more expl…

    …icit in its purpose.
    
    - Introduced new CryptoAlgorithm#nonPkcs11Provider to ensure PKCS11 provider won't be used when required key material is required (i.e. for ephemeral key(pair) KeyAlgorithms).
    - Ensured CryptoAlgorithm#generateCek ignored applying a PKCS11 provider since required key material wouldn't be available otherwise.
    lhazlewood committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    1a72ba1 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2023

  1. - Renamed CryptoAlgorithm#generateKey to #generateCek to be more expl…

    …icit in its purpose.
    
    - Introduced new CryptoAlgorithm#nonPkcs11Provider to ensure PKCS11 provider won't be used when required key material is required (i.e. for ephemeral key(pair) KeyAlgorithms).
    - Ensured CryptoAlgorithm#generateCek ignored applying a PKCS11 provider since required key material wouldn't be available otherwise.
    - Ensured DefaultJwtBuilder and DefaultJwtParser would use the provider for the KeyAlgorithm, but not for the AeadAlgorithm (unless using direct encryption)
    lhazlewood committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    637d76e View commit details
    Browse the repository at this point in the history
  2. - Adjusted test case to ensure deterministic outcomes

    - Consolidated unsigned byte array length calculation for non-negative integers (used in a few places) to a new Bytes#uintLength method. Refactored other classes to use this new method to eliminate code duplication
    lhazlewood committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    20bfe4a View commit details
    Browse the repository at this point in the history
  3. - Adjusted test case to ensure deterministic outcomes

    - Consolidated unsigned byte array length calculation for non-negative integers (used in a few places) to a new Bytes#uintLength method. Refactored other classes to use this new method to eliminate code duplication
    lhazlewood committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    09d0dab View commit details
    Browse the repository at this point in the history
  4. - Added tests for JWS MAC algorithms (HS256, HS384, HS512) with PKCS1…

    …1 secret keys
    
    - Explicitly prevented Password instances in DefaultMacAlgorithm
    - Fixed the EdwardsCurve#keyBitLength implementation to accurately reflect RFC key sizes and not encoded byte array sizes.
    - OptionalMethodInvoker now supports static invocations in addition to the existing instance invocation support.
    lhazlewood committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    a5eea43 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2023

  1. Configuration menu
    Copy the full SHA
    a2bfddd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ba609b1 View commit details
    Browse the repository at this point in the history