Skip to content

Commit 282ee57

Browse files
committed
Changed Raw Message Codec Exceptions to correct messages.
1 parent e5eda2d commit 282ee57

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

u2f-ref-code/java/src/com/google/u2f/codec/RawMessageCodec.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static RegisterRequest decodeRegisterRequest(byte[] data) throws U2FExcep
5353

5454
return new RegisterRequest(appIdSha256, challengeSha256);
5555
} catch (IOException e) {
56-
throw new U2FException("Error when parsing raw RegistrationResponse", e);
56+
throw new U2FException("Error when parsing raw RegisterRequest", e);
5757
}
5858
}
5959

@@ -112,7 +112,7 @@ public static RegisterResponse decodeRegisterResponse(byte[] data) throws U2FExc
112112

113113
return new RegisterResponse(userPublicKey, keyHandle, attestationCertificate, signature);
114114
} catch (IOException e) {
115-
throw new U2FException("Error when parsing raw RegistrationResponse", e);
115+
throw new U2FException("Error when parsing raw RegisterResponse", e);
116116
} catch (CertificateException e) {
117117
throw new U2FException("Error when parsing attestation certificate", e);
118118
}
@@ -156,7 +156,7 @@ public static AuthenticateRequest decodeAuthenticateRequest(byte[] data) throws
156156

157157
return new AuthenticateRequest(controlByte, challengeSha256, appIdSha256, keyHandle);
158158
} catch (IOException e) {
159-
throw new U2FException("Error when parsing raw RegistrationResponse", e);
159+
throw new U2FException("Error when parsing raw AuthenticateRequest", e);
160160
}
161161
}
162162

@@ -188,7 +188,7 @@ public static AuthenticateResponse decodeAuthenticateResponse(byte[] data) throw
188188

189189
return new AuthenticateResponse(userPresence, counter, signature);
190190
} catch (IOException e) {
191-
throw new U2FException("Error when parsing rawSignData", e);
191+
throw new U2FException("Error when parsing raw AuthenticateResponse", e);
192192
}
193193
}
194194

0 commit comments

Comments
 (0)