Skip to content

Commit

Permalink
Merge pull request open-keychain#2631 from n0emis/ignore-random-octet
Browse files Browse the repository at this point in the history
ignore randomly generated last octet of OIDs for ECKeys. fixes open-keychain#2590

* github.com:open-keychain/open-keychain:
  ignore randomly generated last octet of OIDs for ECKeys. fixes open-keychain#2590
  • Loading branch information
msfjarvis committed Feb 5, 2021
2 parents 1891717 + 7651fea commit a7c6bde
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static KeyFormat fromBytes(byte[] bytes) {
throw new IllegalArgumentException("Bad length for EC attributes");
}
int len = bytes.length - 1;
if (bytes[bytes.length - 1] == (byte)0xff) {
if (bytes[len] >= (byte)0x80) {
len -= 1;
}
final byte[] boid = new byte[2 + len];
Expand Down

0 comments on commit a7c6bde

Please sign in to comment.