Merge pull request #174 from JacobBarthelmeh/testing

fix for setting rPad/sPad value
pull/176/head
John Safranek 2019-06-24 09:41:08 -07:00 committed by GitHub
commit e4c97be319
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -7076,10 +7076,12 @@ static int BuildUserAuthRequestEcc(WOLFSSH* ssh,
} }
if (ret == WS_SUCCESS) { if (ret == WS_SUCCESS) {
byte rPad = (r[0] & 0x80) ? 1 : 0; byte rPad;
byte sPad = (s[0] & 0x80) ? 1 : 0; byte sPad;
rPad = 0; sPad = 0; /* adds a byte of padding if needed to avoid negative values */
rPad = (r[0] & 0x80) ? 1 : 0;
sPad = (s[0] & 0x80) ? 1 : 0;
c32toa(rSz + rPad + sSz + sPad + c32toa(rSz + rPad + sSz + sPad +
cannedKeyAlgoEcc256NamesSz + LENGTH_SZ * 4, cannedKeyAlgoEcc256NamesSz + LENGTH_SZ * 4,
output + begin); output + begin);