Skip to content

Commit

Permalink
disable support for the RSA PKCS v1.5 JWE encryption algorithm
Browse files Browse the repository at this point in the history
as it is deemed unsafe due to the Marvin attack and is removed from
libcjose as well

Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
  • Loading branch information
zandbelt committed Apr 23, 2024
1 parent a65ff57 commit 7b06f77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
04/23/2024
- disable support for the RSA PKCS v1.5 JWE encryption algorithm as it is deemed unsafe
due to the Marvin attack and is removed from libcjose as well

04/05/2024
- add debug printout for OIDCUnAuthAction expression evaluation

Expand Down
3 changes: 1 addition & 2 deletions src/jose.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ static int oidc_alg2kty(const char *alg) {
if ((_oidc_strcmp(alg, CJOSE_HDR_ALG_A128KW) == 0) || (_oidc_strcmp(alg, CJOSE_HDR_ALG_A192KW) == 0) ||
(_oidc_strcmp(alg, CJOSE_HDR_ALG_A256KW) == 0))
return CJOSE_JWK_KTY_OCT;
if ((_oidc_strcmp(alg, CJOSE_HDR_ALG_RSA1_5) == 0) || (_oidc_strcmp(alg, CJOSE_HDR_ALG_RSA_OAEP) == 0))
if (_oidc_strcmp(alg, CJOSE_HDR_ALG_RSA_OAEP) == 0)
return CJOSE_JWK_KTY_RSA;
return -1;
}
Expand Down Expand Up @@ -631,7 +631,6 @@ apr_byte_t oidc_jose_jws_algorithm_is_supported(apr_pool_t *pool, const char *al
*/
apr_array_header_t *oidc_jose_jwe_supported_algorithms(apr_pool_t *pool) {
apr_array_header_t *result = apr_array_make(pool, 4, sizeof(const char *));
APR_ARRAY_PUSH(result, const char *) = CJOSE_HDR_ALG_RSA1_5;
APR_ARRAY_PUSH(result, const char *) = CJOSE_HDR_ALG_A128KW;
APR_ARRAY_PUSH(result, const char *) = CJOSE_HDR_ALG_A192KW;
APR_ARRAY_PUSH(result, const char *) = CJOSE_HDR_ALG_A256KW;
Expand Down

0 comments on commit 7b06f77

Please sign in to comment.