Add unit tests for protocol downgrade prevention

This CL adds unit tests for when source and sink have different versions
and for testing version downgrade prevention when both parties have
versions newer than 1.

In addition, following two minor changes are included:
1. Fix error codes
2. Change the context used for key derivation as per code review comment
on the AIDL CL.

Test: atest libauthgraph_boringssl_test
Change-Id: I05de0e05add07141c03b007bcf84b688cc487c7f
5 files changed
tree: 40f5534d3cf77908086c6b3c224a9a00e95df7ad
  1. boringssl/
  2. core/
  3. derive/
  4. hal/
  5. tests/
  6. wire/
  7. .gitignore
  8. Android.bp
  9. NOTICE
  10. PREUPLOAD.cfg