Hack cpp uncertain ECDSA behaivour:

+ cpp sends v = 0/1 on the RLPx level when java works with v = 27/28
   with the current hack full traffic interoperability achieved
This commit is contained in:
Roman Mandeleil 2015-02-25 22:47:05 +02:00
parent 552b86507f
commit 8af4556a4f
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,10 @@ public class Message {
byte[] s = new byte[32];
byte v = signature[64];
// todo: remove this when cpp conclude what they do here
if (v == 1) v = 28;
if (v == 0) v = 27;
System.arraycopy(signature, 0, r, 0, 32);
System.arraycopy(signature, 32, s, 0, 32);