Commit Graph
10 Commits
Author SHA1 Message Date
Karl Seguin 2e6999f20b chore: make declarations private if they don't need to be public
This change is 99%  s/pub//   + a handful of dead code removal.
2026-09-10 14:42:09 +08:00
Halil Durak a4ba95b3ad changes for Zig 0.16 (again) 2026-07-22 18:29:33 +03:00
Halil Durak b791512b37 libcrypto: remove dead bindings 2026-07-22 18:29:32 +03:00
Halil Durak 1c97bc42a4 crypto: more bindings
* bind `X509_STORE_get0_objects`,
* bind `sk_num`,
* bind `sk_X509_OBJECT_num`,
* add `getCertCount` helper.
2026-07-22 18:29:29 +03:00
Halil Durak c967469c49 libcrypto: bind X509_STORE_load_locations 2026-07-04 12:19:09 +03:00
Halil Durak c86dad5430 libcrypto: remove unused utilities 2026-07-02 08:46:22 +03:00
Halil Durak 6e75a0caa9 libcrypto: bind couple X509, X509_STORE and SSL_CTX helpers 2026-07-02 08:46:20 +03:00
Karl Seguin b7c3814ece WPT /WebCryptoAPI/
I threw Claude at WPT's /WebCryptoAPI/ which represents a significant number of
failing cases.

There were a few very low-hanging fruit, like enabling CryptoKey on Worker and
supporting `{name: string}` in addition to just `string` for some functions.

Some of these "fixes" just handle the error case / validation, which tends to
represent a greater number of WPT cases, e.g. some of the importKey algorithms
aren't fully supported, but they still validate the input and return the correct
errors.

To that end, while there should be considerably more passing cases (~42K), some
of these changes merely unlocked more failing cases, so our total case count
should go up.

Claude's summary:

  1. digest {name} object fix (16→80)
  2. Symmetric importKey/exportKey/generateKey (AES, HMAC; raw + jwk) + CryptoKey
  accessors + DataError
  3. EC/OKP importKey usage validation (failure-path)
  4. PBKDF2 + HKDF deriveBits, then deriveKey
  5. ECDH generateKey + import (spki/pkcs8) + deriveBits/deriveKey
  6. AES encrypt/decrypt (CBC/CTR/GCM)
2026-06-08 14:04:15 +08:00
Halil Durak 39352a6bda refactor SubtleCrypto
I've been thinking the implementation here is messy (ever since we added support for it) and thought it would be better to separate each algorithm to their respective files in order to maintain in a long run. `digest` is also refactored to prefer libcrypto instead of std.
2026-03-24 16:04:50 +03:00
Halil Durak 0838b510f8 src/crypto.zig -> src/sys/libcrypto.zig
Now that we have `sys/`, I think this makes more sense.
2026-03-24 16:04:49 +03:00