Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
  • Loading branch information
arthurscchan committed Mar 21, 2023
1 parent 9887554 commit ae178a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 1 addition & 3 deletions fuzzing/src/main/java/fuzzing/JsonCanonicalizerFuzzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
package fuzzing;

import com.code_intelligence.jazzer.api.FuzzedDataProvider;

import java.io.IOException;

import dev.sigstore.json.canonicalizer.JsonCanonicalizer;
import dev.sigstore.json.canonicalizer.NumberToJSON;
import java.io.IOException;

public class JsonCanonicalizerFuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
Expand Down
11 changes: 5 additions & 6 deletions fuzzing/src/main/java/fuzzing/SignerVerifierFuzzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,22 @@
package fuzzing;

import com.code_intelligence.jazzer.api.FuzzedDataProvider;

import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;

import dev.sigstore.encryption.signers.Signer;
import dev.sigstore.encryption.signers.Signers;
import dev.sigstore.encryption.signers.Verifier;
import dev.sigstore.encryption.signers.Verifiers;

import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;

public class SignerVerifierFuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
try {
Integer choice = data.consumeInt(0, 1);
byte[] byteArray = data.consumeRemainingAsBytes();

Signer signer = (choice == 1)? Signers.newEcdsaSigner():Signers.newRsaSigner();
Signer signer = (choice == 1)? Signers.newEcdsaSigner() : Signers.newRsaSigner();
Verifier verifier = Verifiers.newVerifier(signer.getPublicKey());

byte[] signature1 = signer.sign(byteArray);
Expand Down

0 comments on commit ae178a2

Please sign in to comment.