frivpn
frivpn copied to clipboard
Support SHA512 auth
Currently only SHA1 is supported.
Worked on this for a bit but since it's not the reason why nordvpn doesn't work I don't really see a reason to finish this at the moment. Therefore I moved the SHA512 stuff to a different branch and removed it from master again to keep master as lean as possible.
There's still stuff missing in the hmac_sha512 branch before SHA512 could work:
ovpn_ctl.c:113: uint8_t hmac[20]; /* TODO: what about SHA512? */
ovpn_ctl.c:146: return compare_hmac(buf, hdr->hmac, 20); /* TODO: what about SHA512? */
Apart from this the hmac_sha512 branch is completely untested at the moment and SHA1 might even be broken there as the branch is completely untested.
Seems like a C union is the perfect solution for this.