]> gitweb.factorcode.org Git - factor.git/commitdiff
openssl.libssl: allow "unknown" state in initialized ssl object unit test
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 22 Apr 2023 02:02:50 +0000 (21:02 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 22 Apr 2023 02:07:18 +0000 (21:07 -0500)
The behavior of a fully passing test suite seems to contradict that
the "unknown" state should not happen in the ssl object that has
just been initialized. If you know why this happens or think it's
problematic, please file an issue.

The same issue happens with C: https://paste.factorcode.org/paste?id=4554

basis/openssl/libssl/libssl-tests.factor

index dee418066eb415a8d8e19ab2a8be91d3c10dff28..c699880c043b181562e91b31da4ad7fe95dec2ee 100644 (file)
@@ -52,14 +52,15 @@ maybe-init-ssl
     "before SSL initialization" "before/connect initialization" ? =
 ] unit-test
 
-{
-    { "read header" 1 }
-} [
+{ t 1 } [
     [
-        new-tls-ctx new-ssl {
-            SSL_rstate_string_long
+        new-tls-ctx new-ssl [
+            ! the windows dll from build-from-source.windows returns "unknown"
+            ! but still passes the test suite and can get https sites
+            SSL_rstate_string_long { "read header" "unknown" } member?
+        ] [
             SSL_want
-        } [ execute( x -- x ) ] with map
+        ] bi
     ] with-destructors
 ] unit-test