Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
max402 committed Feb 6, 2024
1 parent 6edf473 commit e4dba7d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public PublicKey readPubKey(String encoded) {
// FIXME: Legacy stuff
byte[] bytes = Base64.getDecoder().decode(encoded);
SubjectPublicKeyInfo subjectPublicKeyInfo = SubjectPublicKeyInfo.getInstance(bytes);
if (RSA.equals(subjectPublicKeyInfo.getAlgorithm())) {
if (RSA.equals(subjectPublicKeyInfo.getAlgorithm().getAlgorithm())) {
return new org.bouncycastle.jcajce.provider.asymmetric.rsa.KeyFactorySpi().generatePublic(SubjectPublicKeyInfo.getInstance(bytes));
} else if (EC.equals(subjectPublicKeyInfo.getAlgorithm())) {
} else if (EC.equals(subjectPublicKeyInfo.getAlgorithm().getAlgorithm())) {
return new org.bouncycastle.jcajce.provider.asymmetric.ec.KeyFactorySpi.ECDH().generatePublic(subjectPublicKeyInfo);
}
throw new DecryptionException("PublicKeySerdeImpl.UnsupportedEncodedKey");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ keys:
algo: enc-algo
size: 13
sigAlgo: srv-sig-algo
curve: curve
signing:
algo: sig-algo
size: 14
sigAlgo: srv-sig-algo
curve: curve
cms:
algo: cms-algo1
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ keys:
algo: enc-algo
size: 13
sigAlgo: srv-sig-algo
curve: curve
signing:
algo: sig-algo
size: 14
sigAlgo: srv-sig-algo
curve: curve
cms:
algo: cms-algo1
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ keys:
algo: enc-algo
size: 13
sigAlgo: srv-sig-algo
curve: curve
signing:
algo: sig-algo
size: 14
sigAlgo: srv-sig-algo
curve: curve
cms:
algo: AES256_GCM
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ keys:
algo: AES
size: 256
encrypting:
algo: RSA
size: 2048
sigAlgo: SHA256withRSA
algo: ECDH
size: 256
sigAlgo: SHA256withECDSA
curve: Curve25519
signing:
algo: RSA
size: 2048
sigAlgo: SHA256withRSA
algo: ECDH
size: 256
sigAlgo: SHA256withECDSA
curve: Curve25519
cms:
algo: cms-algo1
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ keys:
algo: enc-algo
size: 13
sigAlgo: srv-sig-algo
curve: curve
signing:
algo: sig-algo
size: 14
sigAlgo: srv-sig-algo
curve: curve
cms:
algo: cms-algo1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ keys:
algo: enc-algo
size: 13
sigAlgo: srv-sig-algo
curve: curve
signing:
algo: sig-algo
size: 14
sigAlgo: srv-sig-algo
curve: curve
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ keys:
algo: enc-algo
size: 13
sigAlgo: srv-sig-algo
curve: curve
signing:
algo: sig-algo
size: 14
sigAlgo: srv-sig-algo
curve: curve
cms:
algo: cms-algo1

0 comments on commit e4dba7d

Please sign in to comment.