Skip to content

Commit

Permalink
Fix hash cases
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpaljak committed Jul 3, 2020
1 parent 44d41ca commit dc45cd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/src/main/java/pro/javacard/gp/GPCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ public static void load(GPSession gp, CAPFile cap, AID to, AID dapAID, LFDBH has
if (dapRequired) {
switch (lfdbh) {
case SHA1:
dap = cap.getMetaInfEntry(CAPFile.DAP_RSA_V1_SHA256_FILE);
dap = cap.getMetaInfEntry(CAPFile.DAP_RSA_V1_SHA1_FILE);
break;
case SHA256:
dap = cap.getMetaInfEntry(CAPFile.DAP_RSA_V1_SHA1_FILE);
dap = cap.getMetaInfEntry(CAPFile.DAP_RSA_V1_SHA256_FILE);
break;
default:
throw new IllegalArgumentException("Unsupported DAP hash algoriothm: " + hash);
throw new IllegalArgumentException("Unsupported DAP hash algorithm: " + hash);
}
} else {
dap = null;
Expand Down

0 comments on commit dc45cd7

Please sign in to comment.