v0.19 port ssl #1446

Merged
vyzo merged 16 commits from v0.19-ssl into v0.19-staging 2026-06-06 16:00:21 +00:00
Owner

brings the ssl lib to v19... and this pulls in a whole lot of things just to run the tests

brings the ssl lib to v19... and this pulls in a whole lot of things just to run the tests
@ -130,2 +132,4 @@
"format/api"
(gxc: "crypto/libcrypto"
"-cc-options" ,(append-options (cppflags "libcrypto" "") "-Wno-discarded-qualifiers" "-Wno-deprecated-declarations" "-Wno-implicit-function-declaration")
Author
Owner

see #1449 for the ticking rotbombs

see #1449 for the ticking rotbombs
fare left a comment

Minor comments

Minor comments
@ -0,0 +5,4 @@
./libcrypto)
(export #t)
(deferror-class LibCryptoError () libcrypto-error?
Owner

Frankly, I don't like these predicate name overrides.

If there's a systematic change from CamelCase to kebab-case, then it should be automated.

Also in this case, why LibCrypto but libcrypto instead of lib-crypto? Or is this part of a special case in handling the libfoos? Now we have an entire parser for some weird underspecified language, just brainside rather than computer-side.

I really don't like it.

Frankly, I don't like these predicate name overrides. If there's a systematic change from CamelCase to kebab-case, then it should be automated. Also in this case, why LibCrypto but libcrypto instead of lib-crypto? Or is this part of a special case in handling the libfoos? Now we have an entire parser for some weird underspecified language, just brainside rather than computer-side. I really don't like it.
Author
Owner

eh, it is such a minor thing. We could drop it, i just like to have the option to only export the predicate and hide the class.

For LibFoo errors we should normalize somewhere, hence the attempt.

eh, it is such a minor thing. We could drop it, i just like to have the option to only export the predicate and hide the class. For LibFoo errors we should normalize somewhere, hence the attempt.
Owner

In my variant, instead of a fixed flag, an optional argument wtih sensible defaults, as in mkostemps. Maybe the mode should be overridable, too.

e.g. O_APPEND, O_ASYNC, O_CLOEXEC, O_DIRECT, O_DIRECTORY, O_DSYNC, O_LARGEFILE, O_NOATIME, O_NOCTTY, O_NOFOLLOW, O_NONBLOCK, O_PATH, O_SYNC, O_TMPFILE, O_TRUNC.

Also, I believe we should include O_EXCL by default.

If using O_TMPFILE (file exists for sharing contents, but pre-deleted so no name sharing) then we don't need the randomness or suffix, only a directory name as the "prefix".

In my variant, instead of a fixed flag, an optional argument wtih sensible defaults, as in mkostemps. Maybe the mode should be overridable, too. e.g. O_APPEND, O_ASYNC, O_CLOEXEC, O_DIRECT, O_DIRECTORY, O_DSYNC, O_LARGEFILE, O_NOATIME, O_NOCTTY, O_NOFOLLOW, O_NONBLOCK, O_PATH, O_SYNC, O_TMPFILE, O_TRUNC. Also, I believe we should include O_EXCL by default. If using O_TMPFILE (file exists for sharing contents, but pre-deleted so no name sharing) then we don't need the randomness or suffix, only a directory name as the "prefix".
fare marked this conversation as resolved
@ -84,0 +60,4 @@
(encoded (base64-encode bytes
padding: #f
urlsafe: #t)))
(string-append name "." encoded)))
Owner

For various reasons, we may want a suffix and a prefix, and not just a name. Suffix, because some software wants the file to have a prefix attached (e.g. .ss .js .xls .doc .exe etc.) If we have a prefix, we don't need the "." just (string-append name encoded suffix)

For various reasons, we may want a suffix and a prefix, and not just a name. Suffix, because some software wants the file to have a prefix attached (e.g. `.ss` `.js` `.xls` `.doc` `.exe` etc.) If we have a prefix, we don't need the `"."` just `(string-append name encoded suffix)`
fare marked this conversation as resolved
@ -0,0 +25,4 @@
(def test-server-address
"127.0.0.1:39999")
(def test-csr-template #<<END
Owner

No autodetection that this is inet4 ?

No autodetection that this is inet4 ?
Author
Owner

no, we should make the complicate aton parser that auto detects ip4/6 and dns.

no, we should make the complicate `aton` parser that auto detects ip4/6 and dns.
Author
Owner

I'll make an issue

I'll make an issue
Author
Owner
#1450
vyzo merged commit 54c145b300 into v0.19-staging 2026-06-06 16:00:21 +00:00
vyzo referenced this pull request from a commit 2026-06-06 16:00:22 +00:00
vyzo deleted branch v0.19-ssl 2026-06-06 16:00:31 +00:00
Sign in to join this conversation.
No description provided.