Skip to content

Commit 52445c0

Browse files
dependabot[bot]jannottigmalouf
authored
Deps: Bump org.bouncycastle:bcprov-jdk15to18 from 1.66 to 1.78 (#778)
* Bump org.bouncycastle:bcprov-jdk15to18 from 1.66 to 1.78 Bumps [org.bouncycastle:bcprov-jdk15to18](https://github.com/bcgit/bc-java) from 1.66 to 1.78. - [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html) - [Commits](https://github.com/bcgit/bc-java/commits) --- updated-dependencies: - dependency-name: org.bouncycastle:bcprov-jdk15to18 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Don't try to parse an address as a PK unless it must be Previously, we always parsed the `singleSigner` but that is often just a program hash, and so it might not be a valid ed25519 pk. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: John Jannotti <[email protected]> Co-authored-by: Gary Malouf <[email protected]>
1 parent bdd5e7e commit 52445c0

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<dependency>
113113
<groupId>org.bouncycastle</groupId>
114114
<artifactId>bcprov-jdk15to18</artifactId>
115-
<version>1.66</version>
115+
<version>1.78</version>
116116
</dependency>
117117
<dependency>
118118
<groupId>org.msgpack</groupId>

src/main/java/com/algorand/algosdk/crypto/LogicsigSignature.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,15 @@ public boolean verify(Address singleSigner) throws NoSuchAlgorithmException {
174174

175175
sanityCheckProgram(this.logic);
176176

177-
PublicKey pk;
178-
try {
179-
pk = singleSigner.toVerifyKey();
180-
} catch (Exception ex) {
181-
return false;
182-
}
183-
184177
if (this.sig != null) {
185178
try {
186179
java.security.Signature sig = java.security.Signature.getInstance(SIGN_ALGO);
180+
PublicKey pk;
181+
try {
182+
pk = singleSigner.toVerifyKey();
183+
} catch (Exception ex) {
184+
return false;
185+
}
187186
sig.initVerify(pk);
188187
sig.update(this.bytesToSign());
189188
return sig.verify(this.sig.getBytes());

0 commit comments

Comments
 (0)