19670949ca
Rather than adding a new mode to EVP_PKEY_CTX, upstream chose to tie single-shot signing to EVP_MD_CTX, adding functions which combine EVP_Digest*Update and EVP_Digest*Final. This adds a weird vestigial EVP_MD_CTX and makes the signing digest parameter non-uniform, slightly complicating things. But it means APIs like X509_sign_ctx can work without modification. Align with upstream's APIs. This required a bit of fiddling around evp_test.cc. For consistency and to avoid baking details of parameter input order, I made it eagerly read all inputs before calling SetupContext. Otherwise which attributes are present depend a lot on the shape of the API we use---notably the NO_DEFAULT_DIGEST tests for RSA switch to failing before consuming an input, which is odd. (This only matters because we have some tests which expect the operation to abort the operation early with parameter errors and match against Error. Those probably should not use FileTest to begin with, but I'll tease that apart a later time.) Upstream also named NID_Ed25519 as NID_ED25519, even though the algorithm is normally stylized as "Ed25519". Switch it to match. Change-Id: Id6c8f5715930038e754de50338924d044e908045 Reviewed-on: https://boringssl-review.googlesource.com/17044 Commit-Queue: Steven Valdez <svaldez@google.com> Reviewed-by: Steven Valdez <svaldez@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
obj_dat.h | ||
obj_mac.num | ||
obj_test.cc | ||
obj_xref.c | ||
obj.c | ||
objects.go | ||
objects.txt | ||
README |
The files nid.h, obj_mac.num, and obj_dat.h are generated from objects.txt and obj_mac.num. To regenerate them, run: go run objects.go objects.txt contains the list of all built-in OIDs. It is processed by objects.go to output obj_mac.num, obj_dat.h, and nid.h. obj_mac.num is the list of NID values for each OID. This is an input/output file so NID values are stable across regenerations. nid.h is the header which defines macros for all the built-in OIDs in C. obj_dat.h contains the ASN1_OBJECTs corresponding to built-in OIDs themselves along with lookup tables for search by short name, OID, etc.