Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
`$ copybara third_party/java_src/jose4j/copy.bara.sky default  --force  --piper-description-behavior OVERWRITE -- jose4j-0.9.3`

This CL drops the Google-internal patch for `RSA1_5` padding oracle mitigations. It also gets us to the most recent version (finally!). After this, we should register this project for copybara as a service so updates happen monthly (when available).

#MIGRATION_3P_JAVA_SRC_JOSE4J__DEFAULT

  - aabcf0bdde392a6d7ef1fd5a12549f1a3fcbe319 [maven-release-plugin] prepare release jose4j-0.9.2 by Brian Campbell <[email protected]>
  - dad416151f06bcffb8ffc1a2c31b1fe741c29256 [maven-release-plugin] prepare for next development itera... by Brian Campbell <[email protected]>
  - 1929fe30cfa769bf4deba89928653da028cb72e5 PBES2 - disallow iteration count < 1000 (Issue #203) and ... by Brian Campbell <[email protected]>
  - 14e62a8dee9decb4ff6e0625aedc5724601bfdb6 Addtional controls around RSAES-PKCS1-v1_5 including addi... by Brian Campbell <[email protected]>
  - 63b86581e7bfcc2d9d04ee15caea4b5bfb911f59 Additional controls around RSAES-PKCS1-v1_5 including add... by Brian Campbell <[email protected]>
  - 0aad8fc75d599a049bba2b3a75f5bcba1009cfaf [maven-release-plugin] prepare release jose4j-0.9.3 by Brian Campbell <[email protected]>

NOKEYCHECK=True
PiperOrigin-RevId: 577462443
  • Loading branch information
mdusina authored and Copybara-Service committed Oct 28, 2023
1 parent 59fb8d7 commit cd5d271
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.security.Key;
import java.util.ArrayList;
import java.util.List;
import org.jose4j.jwa.AlgorithmConstraints;
import org.jose4j.jwe.JsonWebEncryption;
import org.jose4j.jwk.JsonWebKey;
import org.jose4j.jwk.PublicJsonWebKey;
Expand Down Expand Up @@ -227,6 +228,8 @@ public boolean performDecryption(

try {
decrypter.setCompactSerialization(compactJwe);
// jose.4.j blocks RSA1_5 by default.
decrypter.setAlgorithmConstraints(AlgorithmConstraints.NO_CONSTRAINTS);
JsonWebKey parsedKey = JsonWebKey.Factory.newJwk(decryptionJwk);
Key key;
if (parsedKey instanceof PublicJsonWebKey) {
Expand Down

0 comments on commit cd5d271

Please sign in to comment.