darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.53k stars 444 forks source link

Curl can't download over HTTPS #463

Closed ahyattdev closed 4 years ago

ahyattdev commented 5 years ago

error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

ahyattdev commented 5 years ago

This is the result after enabling Darwin SSL.

Darling [~]$ curl https://www.apple.com
Assertion failed: (isRealized()), function hasCxxDtor, file /home/andrewhyatt/darling/src/external/objc4/runtime/objc-runtime-new.h, line 1137.
Abort trap: 6 (core dumped)
npyl commented 5 years ago

Hi folks, I am interested in this issue. I am not quite sure if I have the knowledge to tinker with it, but I definitely would like to know what is going on.

What is the problem and what steps would someone take if he wanted to fix it?

bugaevc commented 5 years ago

The problem is a lot of stuff is missing from our version of CoreCrypto. You can try to see which unimplemented function is called first and try to implement it, see if you can get it to go further.

npyl commented 5 years ago

Thank you very much for the response. I will check it out.

ahyattdev commented 5 years ago

Now that Corecrypto prints a message when its stubs are called it's apparent what we need:

DARLING CRYPTO STUB: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
DARLING CRYPTO STUB: int ccrsa_verify_pkcs1v15(ccrsa_pub_ctx_t, const uint8_t *, size_t, const uint8_t *, size_t, const uint8_t *, _Bool *)
CuriousTommy commented 4 years ago

@ahyattdev I was wondering, where do those stubs appear? I can't find them in my log. https_apple_log.txt

TheBrokenRail commented 4 years ago

Curl seems to throw a segfault right now:

Darling [~]$ curl https://google.com
_os_log_internal called: CSSM initialized
_os_log_internal called: In ModuleImpl::activate, mAppNotifyCallback=0x0, mAppNotifyCallbackCtx=0x0
_os_log_internal called: create 0x7fe1b640d222 for 0x7fe1b640d220
_os_log_internal called: MDSSession::MDSSession
_os_log_internal called: mds_DbOpen MDS CDSA Directory
_os_log_internal called: Locating com.apple.SecurityServer
Segmentation fault: 11 (core dumped)
ahyattdev commented 4 years ago

I will push some progress that I have made recently soon. Currently working on RSA's PKCS #1 version 1.5 (ccrsa_verify_pkcs1v15) verification.

The segfault is a known issue. Some sites like Google trigger it with however they are wanting the SSL handshake to work.

Other sites progress further, such as https://www.apple.com and https://www.example.com.

I am using example.com for my testing to try and get it to work with that.

ahyattdev commented 4 years ago

@CuriousTommy not sure why that is happening, perhaps it is from a curl build from before I made each function print something?

TheBrokenRail commented 4 years ago

It looks like some stubs are still unimplemented:

Darling [~]$ curl https://example.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
_os_log_internal called: CSSM initialized
_os_log_internal called: In ModuleImpl::activate, mAppNotifyCallback=0x0, mAppNotifyCallbackCtx=0x0
_os_log_internal called: create 0x7fb29140dce2 for 0x7fb29140dce0
_os_log_internal called: MDSSession::MDSSession
_os_log_internal called: mds_DbOpen MDS CDSA Directory
_os_log_internal called: Locating com.apple.SecurityServer
Segmentation fault: 11 (core dumped)
TheBrokenRail commented 4 years ago

Where does it output the logs now, because now all it says is:

$ curl https://example.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
Segmentation fault: 11 (core dumped)

Also, isn't CommonCrypto being built now, should those message be removed?

facekapow commented 4 years ago

I'd like to try working on this; is there anything specific that you know that needs to be implemented? Do you know how I could determine what's missing?

My first instinct would be to run through Curl's source code and see what it uses on macOS to implement HTTPS and try to implement that. Any other suggestions?

bugaevc commented 4 years ago

It uses Security.framework, CommonCrypto and CoreCrypto. Out of those, our CoreCrypto implementation is incomplete.

facekapow commented 4 years ago

Well, I kind of already got that from the previous comments but nonetheless, thank you. I meant more along the lines of specific functions that need to be implemented.

From previous comments, I’m assuming RSA PKCS#1 v1.5 needs to be fully implemented. It seems that parts are already implemented in darling-corecrypto and cURL should be printing “we get here”. However, cURL doesn’t print that, it just segfaults exactly the same way on all of the URLs you mentioned earlier (https://google.com, https://apple.com, and https://example.com), like @TheBrokenRail mentioned above. Is there somewhere else the message could be printed or is something else broken?

facekapow commented 4 years ago

It seems that cURL actually isn't even reaching the missing CoreCrypto implementation. In a debug build of Darling, I've managed to determine that the problem seems to have something to do with Mach ports.

Here's the LLDB backtrace:

Darling [/Volumes/SystemRoot/home/me/git/darling/build]$ lldb -- curl https://www.apple.com
(lldb) target create "curl"
Didn't find debug symbols at /System/Library/Caches/dsym/uuid/79C0D0C2-0CD2-37F3-A869-F82F65FDA0BB.dSYM based on UUID
Debug symbols not found at /usr/lib/dyld
Current executable set to 'curl' (x86_64).
(lldb) settings set -- target.run-args  "https://www.apple.com"
(lldb) run
Process 63 launched: '/usr/bin/curl' (x86_64)
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
Process 63 stopped
* thread #1, name = 'curl', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00007ffff5689bda libsystem_kernel.dylib`mig_strncpy(dest="", src="", len=128) at mig_strncpy.c:87
Target 0: (curl) stopped.
(lldb) bt
warning: could not find Objective-C class data in the process. This may reduce the quality of type information available.
* thread #1, name = 'curl', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x00007ffff5689bda libsystem_kernel.dylib`mig_strncpy(dest="", src="", len=128) at mig_strncpy.c:87
    frame #1: 0x00007ffff5319476 liblaunch.dylib`vproc_mig_look_up2(j=2055, servicename=0x0000000000000000, serviceport=0x00007fffffdfc47c, servercreds=0x00007fffffdfc3b0, targetpid=0, instanceid="", flags=8) at jobUser.c:892
    frame #2: 0x00007ffff5312293 liblaunch.dylib`bootstrap_look_up3(bp=2055, service_name=0x0000000000000000, sp=0x00007fffffdfc47c, target_pid=0, instance_id="", flags=8) at libbootstrap.c:204
    frame #3: 0x00007ffff5312206 liblaunch.dylib`bootstrap_look_up2(bp=2055, service_name=0x0000000000000000, sp=0x00007fffffdfc47c, target_pid=0, flags=8) at libbootstrap.c:191
    frame #4: 0x00007ffff789c5fc Security`Security::MachPlusPlus::Bootstrap::lookup2(this=0x00007fffffdfc4d0, name="com.apple.SecurityServer") const at mach++.cpp:250
    frame #5: 0x00007ffff78be13d Security`Security::SecurityServer::ClientSession::findSecurityd() at ssclient.cpp:183
    frame #6: 0x00007ffff78bddb1 Security`Security::SecurityServer::ClientSession::Global::Global(this=0x00007fc81940da70) at ssclient.cpp:131
    frame #7: 0x00007ffff78be235 Security`Security::SecurityServer::ClientSession::Global::Global(this=0x00007fc81940da70) at ssclient.cpp:129
    frame #8: 0x00007ffff78c75a8 Security`Security::ModuleNexus<Security::SecurityServer::ClientSession::Global>::make() at globalizer.h:122
    frame #9: 0x00007ffff78af4ae Security`Security::ModuleNexusCommon::do_create(this=0x00007ffff7a53d88, make=(Security`Security::ModuleNexus<Security::SecurityServer::ClientSession::Global>::make() at globalizer.h:122))()) at globalizer.cpp:53
    frame #10: 0x00007ffff78af5d3 Security`::___ZN8Security17ModuleNexusCommon6createEPFPvvE_block_invoke(.block_descriptor=0x00007fffffdfc890) at globalizer.cpp:65
    frame #11: 0x00007ffff5549fba libdispatch.dylib`_dispatch_client_callout(ctxt=0x00007fffffdfc890, f=(Security`::___ZN8Security17ModuleNexusCommon6createEPFPvvE_block_invoke() at globalizer.cpp:65)) at objectm.m:434
    frame #12: 0x00007ffff554a2ac libdispatch.dylib`dispatch_once_f(val=0x00007ffff7a53d90, ctxt=0x00007fffffdfc890, func=(Security`::___ZN8Security17ModuleNexusCommon6createEPFPvvE_block_invoke() at globalizer.cpp:65)) at once.c:51
    frame #13: 0x00007ffff554a15b libdispatch.dylib`dispatch_once(val=0x00007ffff7a53d90, block=0x00007ffff78af5b0) at once.c:39
    frame #14: 0x00007ffff78af584 Security`Security::ModuleNexusCommon::create(void* (*)()) [inlined] _dispatch_once(predicate=0x00007ffff7a53d90, block=0x00007ffff78af5b0) block_pointer) at once.h:75
    frame #15: 0x00007ffff78af565 Security`Security::ModuleNexusCommon::create(this=0x00007ffff7a53d88, make=(Security`Security::ModuleNexus<Security::SecurityServer::ClientSession::Global>::make() at globalizer.h:122))()) at globalizer.cpp:65
    frame #16: 0x00007ffff78bf4fd Security`Security::ModuleNexus<Security::SecurityServer::ClientSession::Global>::operator(this=0x00007ffff7a53d88)() at globalizer.h:84
    frame #17: 0x00007ffff78bda86 Security`Security::SecurityServer::ClientSession::activate(this=0x00007fffffdfc9f8) at ssclient.cpp:87
    frame #18: 0x00007ffff77edbec Security`Security::MDSSession::DbOpen(this=0x00007fc81940d380, DbName="MDS CDSA Directory", DbLocation=0x0000000000000000, AccessRequest=1, AccessCred=0x0000000000000000, OpenParameters=0x0000000000000000, DbHandle=0x00007fc81940d2f8) at MDSSession.cpp:693
    frame #19: 0x00007ffff77fa5b6 Security`mds_DbOpen(DLHandle=140497393865714, DbName="MDS CDSA Directory", DbLocation=0x0000000000000000, AccessRequest=1, AccessCred=0x0000000000000000, OpenParameters=0x0000000000000000, DbHandle=0x00007fc81940d2f8) at mdsapi.cpp:196
    frame #20: 0x00007ffff748889e Security`Security::MDSClient::Directory::cdsa(this=0x00007fc81940d270) const at mdsclient.cpp:68
    frame #21: 0x00007ffff7488933 Security`Security::MDSClient::Directory::dlGetFirst(this=0x00007fc81940d270, query=0x00007fffffdfd1f0, attributes=0x00007fc81940d720, data=0x00007fffffdfd128, id=0x00007fffffdfd138) at mdsclient.cpp:86
    frame #22: 0x00007ffff7497efe Security`Security::CssmClient::Table<Security::MDSClient::Common>::startQuery(this=0x00007fffffdfd490, query=0x00007fffffdfd1f0, getData=true) at dliterators.h:251
    frame #23: 0x00007ffff7497b69 Security`Security::CssmClient::Table<Security::MDSClient::Common>::find(this=0x00007fffffdfd490, query=0x00007fffffdfd420) at dliterators.h:229
    frame #24: 0x00007ffff74972a4 Security`Security::CssmClient::Table<Security::MDSClient::Common>::fetch(this=0x00007fffffdfd490, query=0x00007fffffdfd420, err=-2147418109) at dliterators.h:195
    frame #25: 0x00007ffff7605bab Security`MdsComponent::MdsComponent(this=0x00007fffffdfdb38, guid=0x00007fc81940caf4) at cssmmds.cpp:41
    frame #26: 0x00007ffff7605d0d Security`MdsComponent::MdsComponent(this=0x00007fffffdfdb38, guid=0x00007fc81940caf4) at cssmmds.cpp:38
    frame #27: 0x00007ffff7627952 Security`CssmManager::loadModule(this=0x00007fc81940cba0, guid=0x00007fc81940caf4, (null)=0, callback=0x00007fffffdfdbf8) at manager.cpp:135
    frame #28: 0x00007ffff7620154 Security`::CSSM_ModuleLoad(ModuleGuid=0x00007fc81940caf4, KeyHierarchy=0, AppNotifyCallback=0x0000000000000000, AppNotifyCallbackCtx=0x0000000000000000) at cssm.cpp:85
    frame #29: 0x00007ffff748b21e Security`Security::CssmClient::ModuleImpl::activate(this=0x00007fc81940ca10) at cssmclient.cpp:414
    frame #30: 0x00007ffff748bb49 Security`Security::CssmClient::ModuleImpl::load(this=0x00007fc81940ca10) at cssmclient.h:204
    frame #31: 0x00007ffff748b945 Security`Security::CssmClient::AttachmentImpl::activate(this=0x00007fc81940c6e0) at cssmclient.cpp:482
    frame #32: 0x00007ffff7727ad9 Security`Security::CssmClient::AttachmentImpl::attach(this=0x00007fc81940c6e0) at cssmclient.h:257
    frame #33: 0x00007ffff772767c Security`Security::CssmClient::AttachmentImpl::handle(this=0x00007fc81940c6e0) at cssmclient.h:263
    frame #34: 0x00007ffff7690ad7 Security`Security::KeychainCore::Certificate::clHandle(this=0x00007fc81940c488) at Certificate.cpp:1107
    frame #35: 0x00007ffff769125a Security`Security::KeychainCore::Certificate::copyFirstFieldValue(this=0x00007fc81940c488, field=0x00007ffff7a2d2f8) at Certificate.cpp:292
    frame #36: 0x00007ffff76960fd Security`Security::KeychainCore::Certificate::publicKey(this=0x00007fc81940c488) at Certificate.cpp:1206
    frame #37: 0x00007ffff77115d8 Security`::SecCertificateCopyPublicKey(certificate=0x00007fc81940af10, key=0x00007fffffdfe1f0) at SecCertificate.cpp:306
    frame #38: 0x00007ffff777e4e2 Security`::SecTrustCopyPublicKey(trust=0x00007fc81940c0f0) at SecTrust.cpp:686
    frame #39: 0x00007ffff7322f96 Security`tls_helper_set_peer_pubkey(hdsk=0x00007fc809805000) at tls_helpers.c:199
    frame #40: 0x00007ffff783b402 Security`tls_handshake_message_callback(ctx=0x00007fc819407d30, event=tls_handshake_message_certificate) at tlsCallbacks.c:96
    frame #41: 0x00007ffff54d60bf libsystem_coretls.dylib`SSLProcessHandshakeRecordInner(rec=(length = 3024, data = "\v"), ctx=0x00007fc809805000) at sslHandshake.c:241
    frame #42: 0x00007ffff54d6936 libsystem_coretls.dylib`SSLProcessHandshakeRecord(rec=(length = 3024, data = "\v"), ctx=0x00007fc809805000) at sslHandshake.c:491
    frame #43: 0x00007ffff54e0525 libsystem_coretls.dylib`tls_handshake_process(filter=0x00007fc809805000, message=(length = 3024, data = "\v"), contentType='\x16') at tls_handshake.c:298
    frame #44: 0x00007ffff783c6e5 Security`SSLHandshakeProceed(ctx=0x00007fc819407d30) at sslTransport.c:508
    frame #45: 0x00007ffff783cfcb Security`SSLHandshake(ctx=0x00007fc819407d30) at sslTransport.c:430
    frame #46: 0x00007ffff7f85d72 libcurl.4.dylib`darwinssl_connect_step2(conn=0x00007fc809804800, sockindex=0) at darwinssl.c:1828
    frame #47: 0x00007ffff7f83f29 libcurl.4.dylib`darwinssl_connect_common(conn=0x00007fc809804800, sockindex=0, nonblocking=true, done=0x00007fffffdfe86d) at darwinssl.c:2156
    frame #48: 0x00007ffff7f83c48 libcurl.4.dylib`Curl_darwinssl_connect_nonblocking(conn=0x00007fc809804800, sockindex=0, done=0x00007fffffdfe86d) at darwinssl.c:2192
    frame #49: 0x00007ffff7f82ace libcurl.4.dylib`Curl_ssl_connect_nonblocking(conn=0x00007fc809804800, sockindex=0, done=0x00007fffffdfe86d) at vtls.c:322
    frame #50: 0x00007ffff7f40084 libcurl.4.dylib`https_connecting(conn=0x00007fc809804800, done=0x00007fffffdfe86d) at http.c:1403
    frame #51: 0x00007ffff7f7b9d8 libcurl.4.dylib`Curl_protocol_connecting(conn=0x00007fc809804800, done=0x00007fffffdfe86d) at url.c:3537
    frame #52: 0x00007ffff7f520e0 libcurl.4.dylib`multi_runsingle(multi=0x00007fc819405d10, now=(tv_sec = 1583936567, tv_usec = 167663), data=0x00007fc809809800) at multi.c:1251
    frame #53: 0x00007ffff7f516a2 libcurl.4.dylib`curl_multi_perform(multi_handle=0x00007fc819405d10, running_handles=0x00007fffffdfe968) at multi.c:1788
    frame #54: 0x00007ffff7f2948f libcurl.4.dylib`easy_transfer(multi=0x00007fc819405d10) at easy.c:715
    frame #55: 0x00007ffff7f28901 libcurl.4.dylib`easy_perform(data=0x00007fc809809800, events=false) at easy.c:803
    frame #56: 0x00007ffff7f287aa libcurl.4.dylib`curl_easy_perform(easy=0x00007fc809809800) at easy.c:822
    frame #57: 0x00007ffff7fd930d curl`operate_do(global=0x00007fffffdff0a8, config=0x00007fc819405070) at tool_operate.c:1400
    frame #58: 0x00007ffff7fd3be1 curl`operate(config=0x00007fffffdff0a8, argc=2, argv=0x00007fffffdff140) at tool_operate.c:1881
    frame #59: 0x00007ffff7fd2eb4 curl`main(argc=2, argv=0x00007fffffdff140) at tool_main.c:252
    frame #60: 0x00007ffff7fc92b4 curl`start + 52

The key lines are:

    frame #3: 0x00007ffff5312206 liblaunch.dylib`bootstrap_look_up2(bp=2055, service_name=0x0000000000000000, sp=0x00007fffffdfc47c, target_pid=0, flags=8) at libbootstrap.c:191
    frame #4: 0x00007ffff789c5fc Security`Security::MachPlusPlus::Bootstrap::lookup2(this=0x00007fffffdfc4d0, name="com.apple.SecurityServer") const at mach++.cpp:250

Relevant mach++.cpp lines:

mach_port_t Bootstrap::lookup2(const char *name) const
{
    mach_port_t port;
    check(::bootstrap_look_up2(mPort, makeName(name), &port, 0, BOOTSTRAP_PRIVILEGED_SERVER));
    return port;
}

Relevant mach++.hpp lines:

    char *makeName(const char *s) const
    { return strncpy(nameBuffer, s, BOOTSTRAP_MAX_NAME_LEN); }

Relevant libbootstrap.c lines:

kern_return_t
bootstrap_look_up2(mach_port_t bp, const name_t service_name, mach_port_t *sp, pid_t target_pid, uint64_t flags)
{
    uuid_t instance_id;
    return bootstrap_look_up3(bp, service_name, sp, target_pid, instance_id, flags);
}

It seems that something is going on with strncpy, because lookup2 is properly receiving "com.apple.SecurityServer" as name but bootstrap_look_up2 is receiving NULL (0x0000000000000000) as the service_name. The only change applied to name in lookup2 to pass it into bootstrap_look_up2 is makeName, which in turn returns the message name strncpy-ed into nameBuffer.

I'm thinking that there are two things possibly going on here: either a) strncpy is broken (which I think is pretty unlikely), or b) this is NULL for the C++ Bootstrap, making nameBuffer be NULL as well. Unfortunately, I'm leaning towards explaination A because if I'm not mistaken, in explaination B, strncpy should segfault trying to access a NULL pointer, so we wouldn't even get to bootstrap_look_up2.

Either way, it seems that something is going on at a deeper level than just some missing CoreCrypto stuff.

Edit: Should I open up a separate issue for this?

bugaevc commented 4 years ago

I'm thinking that there are two things possibly going on here: either a) strncpy is broken (which I think is pretty unlikely), or b) this is NULL for the C++ Bootstrap, making nameBuffer be NULL as well. Unfortunately, I'm leaning towards explaination A because if I'm not mistaken, in explaination B, strncpy should segfault trying to access a NULL pointer, so we wouldn't even get to bootstrap_look_up2.

Either way, it seems that something is going on at a deeper level than just some missing CoreCrypto stuff.

Edit: Should I open up a separate issue for this?

Thanks for the investigation! Indeed, things look broken. this is clearly not NULL (in your example, this=0x00007fffffdfc4d0). Moreover, strncpy succeeds:

(lldb) p nameBuffer
(char [128]) $0 = "com.apple.SecurityServer"

Yet it appears to be returning NULL. Here's the code for strncpy. It looks fine to me.

Yes, please open a separate issue.

facekapow commented 4 years ago

With the temporary fix described in #708 and my WIP implementation of CoreCrypto in darlinghq/darling-corecrypto#6, cURL now progresses further:

Darling [/Volumes/SystemRoot/home/me/git/darling/build]$ curl https://www.apple.com   
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
DARLING CRYPTO IMPL: int ccrsa_verify_pkcs1v15(ccrsa_pub_ctx_t, const uint8_t *, size_t, const uint8_t *, size_t, const uint8_t *, _Bool *)
key: 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0 0a 03 00 00 00 00 00 d0 2f 35 21 b0 03 af 45 54 1a e5 ea 27 35 48 d4 1d c7 ad dd 1d b0 15 6e 21 8d 9b 59 e8 54 6f 54 a9 67 dd 24 53 a9 62 fb 07 70 08 fc 36 ed 4d 46 04 4f d5 89 bd 95 18 cf 39 40 9e 0f 20 25 54 ae fb bf f0 39 c9 83 cb 24 8f 3d 9b c1 b1 97 a8 42 c9 dc 25 ab c8 06 e5 34 19 7e c5 4f 50 be cc 0d 03 44 5a c7 17 e3 12 92 54 51 fb b0 3b c5 a7 61 4a 43 44 15 5f 10 be 26 aa 45 7a ba 69 86 ec 5b 5f 90 c8 b9 3d 6f b5 bf 84 0b 6e 73 e9 44 8c db ce da 61 aa d8 55 ed 3f 59 11 89 16 a1 c5 63 cd d7 e9 09 d8 31 58 80 72 6b 77 19 8f 99 b7 0c cc 26 64 1d 8a 1a 5a f6 ca 9c 41 8d bc 2e 6c af f8 74 8e f3 69 e9 21 b5 a4 25 b7 e3 44 1c d1 30 74 fe 8b 1e 45 41 bc ab b3 56 b2 c8 b8 d4 a5 10 5f ba bd 5a 70 ca 77 bb 9e 4d e3 e7 36 df c6 07 39 a8 0e 4e 2c 99 ec 28 29 98 e7 73 32 56 73 a6 b6 a2 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0 09 c1 18 af 7f 00 00 01 00 00 00 00 00 00 00 30 0a c1 18 af 7f 00 00 00 00 00 00 00 00 3e 00 b0 07 c1 18 af 7f 00 00 e0 0a c1 18 af 7f 00 00 f0 0f c1 18 af 7f 00 00 01 00 00 00 00 00 00 00 30 09 c1 18 af 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 d0 39 00 c1 18 af 7f 00 00 b0 08 c1 18 af 7f 00 00 e0 0a c1 18 af 7f 00 00 01 00 00 00 00 00 00 00 a0 0a c1 18 af 7f 00 00 00 00 00 00 00 00 04 00 b0 0a c1 18 af 7f 00 00 00 0d c1 18 af 7f 00 00 70 0a c1 18 af 7f 00 00 01 00 00 00 00 00 00 00 e0 0b c1 18 af 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 d0 32 00 74 72 69 62 75 74 65 49 44 00 00 00 02 00 04 00 00 00 00 00 00 00 60 0e c1 18 af 7f 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
oid: 06 09 60 86 48 01 65 03 04 02 01
digest_len: 32
digest: f4 f9 15 b3 1e 23 7b 62 13 1d 6a 7f 1d 40 3e f4 09 49 4a 01 44 49 b1 15 35 3d 49 cf 4b 02 fc 01
sig_len: 256
sig: 6a 78 01 84 97 ca cc b3 2f c1 06 00 5d b7 c0 09 14 79 38 f8 fb df d5 a9 00 11 37 33 47 f8 f9 b2 3d 81 4d 5a 3a b5 c1 92 cd 93 2b 2e df b5 40 38 9f df 33 67 f0 de 26 ca a5 81 78 e4 b6 0d 3c 33 17 11 74 7d 8e af c1 9e 55 91 0e 99 15 78 2a 39 26 e3 76 62 c3 85 14 fd 7d 32 31 41 0d d7 e8 f7 18 0b 8d c1 eb 5e 97 d9 38 24 4b 5a f3 d4 11 73 df fb 68 dc 2b 71 a1 33 39 e9 87 62 89 8f ea 60 bd fb 86 57 b4 fb 85 01 f5 0d b0 75 b2 8b 0d d3 bc e5 86 c7 79 54 bb 0b c9 59 cc e6 85 39 0f ba 21 7c 52 d6 4f 8e 61 0c c3 d7 f2 53 1a 5b 99 59 6b 45 e5 c7 a7 89 25 bb d3 0c 25 bb ac f1 9a 2c eb ee 24 54 37 2d 56 49 29 66 22 65 d8 20 c9 0d ad 5e d0 4a f7 4c e7 a3 74 7e cf 60 03 50 25 0e 89 ce 39 15 ce ca 00 9f e7 0b e1 9a 2d 4c c8 be 8c f2 fd 07 22 9c 11 89 d9 4a 7e b1 58 39 d7 6d
n of mod: 32
mod_len: 256
mod: 2f 35 21 b0 03 af 45 54 1a e5 ea 27 35 48 d4 1d c7 ad dd 1d b0 15 6e 21 8d 9b 59 e8 54 6f 54 a9 67 dd 24 53 a9 62 fb 07 70 08 fc 36 ed 4d 46 04 4f d5 89 bd 95 18 cf 39 40 9e 0f 20 25 54 ae fb bf f0 39 c9 83 cb 24 8f 3d 9b c1 b1 97 a8 42 c9 dc 25 ab c8 06 e5 34 19 7e c5 4f 50 be cc 0d 03 44 5a c7 17 e3 12 92 54 51 fb b0 3b c5 a7 61 4a 43 44 15 5f 10 be 26 aa 45 7a ba 69 86 ec 5b 5f 90 c8 b9 3d 6f b5 bf 84 0b 6e 73 e9 44 8c db ce da 61 aa d8 55 ed 3f 59 11 89 16 a1 c5 63 cd d7 e9 09 d8 31 58 80 72 6b 77 19 8f 99 b7 0c cc 26 64 1d 8a 1a 5a f6 ca 9c 41 8d bc 2e 6c af f8 74 8e f3 69 e9 21 b5 a4 25 b7 e3 44 1c d1 30 74 fe 8b 1e 45 41 bc ab b3 56 b2 c8 b8 d4 a5 10 5f ba bd 5a 70 ca 77 bb 9e 4d e3 e7 36 df c6 07 39 a8 0e 4e 2c 99 ec 28 29 98 e7 73 32 56 73 a6 b6 a2
e: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
DARLING CRYPTO IMPL: void cczp_init(cczp_t)
m: 01 fc 02 4b cf 49 3d 35 15 b1 49 44 01 4a 49 09 f4 3e 40 1d 7f 6a 1d 13 62 7b 23 1e b3 15 f9 f4 20 04 00 05 01 02 04 03 65 01 48 86 60 09 06 0d 30 31 30 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00
em: 00 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 f4 f9 15 b3 1e 23 7b 62 13 1d 6a 7f 1d 40 3e f4 09 49 4a 01 44 49 b1 15 35 3d 49 cf 4b 02 fc 01
em_prime: 00 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 f4 f9 15 b3 1e 23 7b 62 13 1d 6a 7f 1d 40 3e f4 09 49 4a 01 44 49 b1 15 35 3d 49 cf 4b 02 fc 01
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

I guess the CA bundle included with cURL is outdated or something? Either way, with the -k option:

Darling [/Volumes/SystemRoot/home/me/git/darling/build]$ curl https://www.apple.com -k                                                                                                    
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
DARLING CRYPTO IMPL: int ccrsa_verify_pkcs1v15(ccrsa_pub_ctx_t, const uint8_t *, size_t, const uint8_t *, size_t, const uint8_t *, _Bool *)
key: 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0 0a 03 00 00 00 00 00 a0 2f 35 21 b0 03 af 45 54 1a e5 ea 27 35 48 d4 1d c7 ad dd 1d b0 15 6e 21 8d 9b 59 e8 54 6f 54 a9 67 dd 24 53 a9 62 fb 07 70 08 fc 36 ed 4d 46 04 4f d5 89 bd 95 18 cf 39 40 9e 0f 20 25 54 ae fb bf f0 39 c9 83 cb 24 8f 3d 9b c1 b1 97 a8 42 c9 dc 25 ab c8 06 e5 34 19 7e c5 4f 50 be cc 0d 03 44 5a c7 17 e3 12 92 54 51 fb b0 3b c5 a7 61 4a 43 44 15 5f 10 be 26 aa 45 7a ba 69 86 ec 5b 5f 90 c8 b9 3d 6f b5 bf 84 0b 6e 73 e9 44 8c db ce da 61 aa d8 55 ed 3f 59 11 89 16 a1 c5 63 cd d7 e9 09 d8 31 58 80 72 6b 77 19 8f 99 b7 0c cc 26 64 1d 8a 1a 5a f6 ca 9c 41 8d bc 2e 6c af f8 74 8e f3 69 e9 21 b5 a4 25 b7 e3 44 1c d1 30 74 fe 8b 1e 45 41 bc ab b3 56 b2 c8 b8 d4 a5 10 5f ba bd 5a 70 ca 77 bb 9e 4d e3 e7 36 df c6 07 39 a8 0e 4e 2c 99 ec 28 29 98 e7 73 32 56 73 a6 b6 a2 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 c1 82 e4 7f 00 00 01 00 00 00 00 00 00 00 60 09 c1 82 e4 7f 00 00 00 00 00 00 00 00 3e 00 e0 06 c1 82 e4 7f 00 00 10 0a c1 82 e4 7f 00 00 20 0f c1 82 e4 7f 00 00 01 00 00 00 00 00 00 00 60 08 c1 82 e4 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 a0 00 00 00 00 00 00 00 a0 39 00 c1 82 e4 7f 00 00 e0 07 c1 82 e4 7f 00 00 10 0a c1 82 e4 7f 00 00 01 00 00 00 00 00 00 00 d0 09 c1 82 e4 7f 00 00 00 00 00 00 00 00 04 00 e0 09 c1 82 e4 7f 00 00 30 0c c1 82 e4 7f 00 00 a0 09 c1 82 e4 7f 00 00 01 00 00 00 00 00 00 00 10 0b c1 82 e4 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 a0 00 00 00 00 00 00 00 a0 32 00 74 72 69 62 75 74 65 49 44 00 00 00 02 00 04 00 00 00 00 00 00 00 90 0d c1 82 e4 7f 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
oid: 06 09 60 86 48 01 65 03 04 02 01
digest_len: 32
digest: 03 74 de f8 12 9c 60 5e 22 86 e0 bd c8 c8 7e 63 5d b9 71 0a f6 1f 19 9d 89 8a 60 17 d6 9c 2f 33
sig_len: 256
sig: 7b 21 30 29 e2 bf 58 44 35 33 8b c6 18 89 2d b2 55 c6 a0 37 42 65 2b 91 54 67 3e 7b 54 2b b5 64 f5 4d e2 b9 e9 38 63 56 be 12 44 08 4d 2e 8d b9 f6 33 b4 4e 99 d9 de 34 93 05 cd bb 7a 3f 7f 14 b2 68 25 bb ee 01 a4 4f 3f 3a 64 25 58 52 61 77 04 22 87 ad 70 e4 4e c7 bd 5f 05 b5 50 56 d8 37 de 3d 44 22 fa 7c fc 25 21 2d 74 8f 9e 73 aa 89 3d 78 c8 e4 72 1a 75 02 6e 27 cc c9 a9 5b 6e a2 80 eb a9 37 cd f3 1a 86 4a 58 3c 30 2f c9 79 56 e2 d2 09 e5 14 64 c2 3c 3f 7d 76 90 1b d2 51 54 e8 e6 37 c8 f3 5a 69 2a 4e 12 db 66 6a 79 89 10 e0 3b c7 22 c2 81 1b 16 cf 52 d3 ce 74 60 40 a8 fc 6a 23 68 f3 e5 cd c7 42 7e a0 24 53 7c bd 64 78 3c 48 d9 11 39 95 9f c0 8b b3 0b 14 c6 13 7f ee 08 57 57 52 32 c0 58 e8 d5 55 8e 8d 9f 6f e2 d9 e5 40 e8 94 ab 44 85 b5 63 64 99 5d 13 96 59
n of mod: 32
mod_len: 256
mod: 2f 35 21 b0 03 af 45 54 1a e5 ea 27 35 48 d4 1d c7 ad dd 1d b0 15 6e 21 8d 9b 59 e8 54 6f 54 a9 67 dd 24 53 a9 62 fb 07 70 08 fc 36 ed 4d 46 04 4f d5 89 bd 95 18 cf 39 40 9e 0f 20 25 54 ae fb bf f0 39 c9 83 cb 24 8f 3d 9b c1 b1 97 a8 42 c9 dc 25 ab c8 06 e5 34 19 7e c5 4f 50 be cc 0d 03 44 5a c7 17 e3 12 92 54 51 fb b0 3b c5 a7 61 4a 43 44 15 5f 10 be 26 aa 45 7a ba 69 86 ec 5b 5f 90 c8 b9 3d 6f b5 bf 84 0b 6e 73 e9 44 8c db ce da 61 aa d8 55 ed 3f 59 11 89 16 a1 c5 63 cd d7 e9 09 d8 31 58 80 72 6b 77 19 8f 99 b7 0c cc 26 64 1d 8a 1a 5a f6 ca 9c 41 8d bc 2e 6c af f8 74 8e f3 69 e9 21 b5 a4 25 b7 e3 44 1c d1 30 74 fe 8b 1e 45 41 bc ab b3 56 b2 c8 b8 d4 a5 10 5f ba bd 5a 70 ca 77 bb 9e 4d e3 e7 36 df c6 07 39 a8 0e 4e 2c 99 ec 28 29 98 e7 73 32 56 73 a6 b6 a2
e: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
DARLING CRYPTO IMPL: void cczp_init(cczp_t)
m: 33 2f 9c d6 17 60 8a 89 9d 19 1f f6 0a 71 b9 5d 63 7e c8 c8 bd e0 86 22 5e 60 9c 12 f8 de 74 03 20 04 00 05 01 02 04 03 65 01 48 86 60 09 06 0d 30 31 30 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00
em: 00 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 03 74 de f8 12 9c 60 5e 22 86 e0 bd c8 c8 7e 63 5d b9 71 0a f6 1f 19 9d 89 8a 60 17 d6 9c 2f 33
em_prime: 00 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 03 74 de f8 12 9c 60 5e 22 86 e0 bd c8 c8 7e 63 5d b9 71 0a f6 1f 19 9d 89 8a 60 17 d6 9c 2f 33
DARLING CRYPTO STUB: ccec_const_cp_t ccec_cp_256()
curl(57,0x7ffff563a380) malloc: *** mach_vm_map(size=3377696524697600) failed (error code=5)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
curl(57,0x7ffff563a380) malloc: *** error for object 0x7fffffdfe1b0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6 (core dumped)

My preliminary guess at why it crashes is because ccec_cp_256 isn't implemented and it's not returning a specific value, so it's returning undefined values for the pointer it's supposed to return and then cURL tries to use this value later on.

So... I'm closer to implementing HTTPS support now and I just thought I'd share my progress so far.

ahyattdev commented 4 years ago

Cool you got the mod working. Does it pass the unit test installed to /usr/libexec/test_corecrypto?

ahyattdev commented 4 years ago

Looks like you're making good progress! https://github.com/darlinghq/darling-corecrypto/pull/6

facekapow commented 4 years ago

Cool you got the mod working. Does it pass the unit test installed to /usr/libexec/test_corecrypto?

Darling [/Volumes/SystemRoot/home/me/git/darling/build]$ /usr/libexec/test_corecrypto 
TEST 1/15 cc:cc_zero [OK]
TEST 2/15 cc:cc_clear [OK]
TEST 3/15 cc:cc_copy [OK]
TEST 4/15 cc:cc_xor [OK]
TEST 5/15 cc:cc_cmp_safe [OK]
TEST 6/15 cc:CC_SWAP [OK]
TEST 7/15 cc:CC_MAX [OK]
TEST 8/15 cc:CC_MIN [OK]
TEST 9/15 cc:cc_muxp [OK]
TEST 10/15 ccn:ccn_shift_right [OK]
TEST 11/15 ccn:ccn_shift_left [OK]
TEST 12/15 ccn:ccn_add1 [OK]
TEST 13/15 ccn:ccn_add [OK]
TEST 14/15 ccn:ccn_sub [OK]
TEST 15/15 cczp:cczp_mod_prime DARLING CRYPTO IMPL: void cczp_init(cczp_t)
[OK]
RESULTS: 15 tests (15 ok, 0 failed, 0 skipped) ran in 0 ms
ahyattdev commented 4 years ago

Excellent!

facekapow commented 4 years ago

Well, crap:

Darling [/Volumes/SystemRoot/home/me/git/darling/build]$ curl https://www.example.com  
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
DARLING CRYPTO IMPL: int ccrsa_verify_pkcs1v15(ccrsa_pub_ctx_t, const uint8_t *, size_t, const uint8_t *, size_t, const uint8_t *, _Bool *)
key: 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 0a 03 00 00 00 00 00 c0 f9 54 cb 65 77 db 78 04 2b 69 ee 2d 64 21 fc dc e2 e5 3f 15 0e 68 2d eb b1 c4 e1 8f eb 0e c9 a7 64 f8 05 6d c3 85 ed db c9 53 53 6b 66 a5 a0 f5 10 c1 7c 3f c5 4c 28 82 37 6c 6d d4 89 cb 20 ba 1e b1 75 ab 50 05 d1 9d fc aa f8 7e 87 cc e8 05 d3 db 3f 9c 7b 42 49 7a 17 63 9f 59 01 92 60 72 6a a0 3a a1 11 6e 33 58 19 28 dd 71 bd 82 2e 7f 83 d7 e5 cc ee 45 a2 f7 1a 92 d3 f4 48 0b 8d f0 f2 ac 46 49 24 7b 34 8f 9d 41 63 90 06 11 71 b7 60 8f 1f b3 df c9 6d 74 44 9c f0 f6 21 f7 9f 42 b9 13 74 fb 22 c7 34 65 85 c2 09 0f 77 3e 0e d3 dd 8f 45 4c 9d ac 60 fe 12 20 aa 11 85 5c 33 45 6b 18 45 8e f2 3a 60 a4 eb ed aa 27 5e 53 7b d1 75 6a 50 4d 8e 27 d7 75 31 76 92 07 b0 15 42 15 92 71 a5 cf 0c ac d5 db a7 2b 29 a0 8f 66 8c 3a d0 4a 5d 5a 12 19 65 08 72 20 96 a0 74 12 f0 d0 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 11 41 80 f9 7f 00 00 01 00 00 00 00 00 00 00 90 11 41 80 f9 7f 00 00 00 00 00 00 00 00 3e 00 10 0f 41 80 f9 7f 00 00 40 12 41 80 f9 7f 00 00 50 17 41 80 f9 7f 00 00 01 00 00 00 00 00 00 00 90 10 41 80 f9 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 c0 39 00 41 80 f9 7f 00 00 10 10 41 80 f9 7f 00 00 40 12 41 80 f9 7f 00 00 01 00 00 00 00 00 00 00 00 12 41 80 f9 7f 00 00 00 00 00 00 00 00 04 00 10 12 41 80 f9 7f 00 00 60 14 41 80 f9 7f 00 00 d0 11 41 80 f9 7f 00 00 01 00 00 00 00 00 00 00 40 13 41 80 f9 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 c0 32 00 74 72 69 62 75 74 65 49 44 00 00 00 02 00 04 00 00 00 00 00 00 00 c0 15 41 80 f9 7f 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
oid: 06 09 60 86 48 01 65 03 04 02 01
digest_len: 32
digest: 55 fc 62 0f d6 29 64 0d 0a 9d 31 00 d1 72 c6 ca 46 90 a0 e7 a7 86 21 27 3a 32 e8 05 29 db 95 bb
sig_len: 256
sig: 36 a7 97 85 54 fa 15 d9 ca b3 ef c2 ae c0 68 73 a1 6a 7a 8d 1e bb e8 a3 ae 1c cf 21 e5 e2 43 17 3e 73 38 60 a1 17 41 fb 97 eb 15 59 72 aa d1 7c 44 9f 19 84 28 ce 85 f2 bd 43 9a 8b 57 94 a7 2b 8b dd 88 3d 37 9c ec 37 d8 7a 25 ad f2 43 c5 76 8d 48 12 74 91 ec bb 9a ed c6 85 96 91 bb f8 58 3c 1d 61 0b 38 41 a1 4a fb 0f 45 94 4f 18 6c 34 b6 b7 56 ac 0a f2 b1 c6 25 db 22 3e 11 bc be b8 59 2f e5 2c 8b 62 c7 71 5a 01 b9 10 bc e3 20 6a 67 68 50 88 ca 07 c4 e9 2b c7 83 64 63 44 ec ba ce 38 c8 fd 53 5b 8d 35 f6 9c f1 e6 9f 90 0a a5 14 c7 5e c0 19 22 60 7f 7b ad 00 05 05 ee 2b 7f 91 25 e5 71 73 af f7 4e bb 3a fd 53 7f b3 db 07 98 d3 9c 67 99 b0 75 d3 da 34 45 93 9f 27 f0 cd 89 a3 44 3b 25 c2 94 f1 bf 52 ff 13 f9 35 29 7c 7b 03 d1 4a 03 55 dc 37 33 b9 12 00 d3 25 ad cd
n of mod: 32
mod_len: 256
mod: f9 54 cb 65 77 db 78 04 2b 69 ee 2d 64 21 fc dc e2 e5 3f 15 0e 68 2d eb b1 c4 e1 8f eb 0e c9 a7 64 f8 05 6d c3 85 ed db c9 53 53 6b 66 a5 a0 f5 10 c1 7c 3f c5 4c 28 82 37 6c 6d d4 89 cb 20 ba 1e b1 75 ab 50 05 d1 9d fc aa f8 7e 87 cc e8 05 d3 db 3f 9c 7b 42 49 7a 17 63 9f 59 01 92 60 72 6a a0 3a a1 11 6e 33 58 19 28 dd 71 bd 82 2e 7f 83 d7 e5 cc ee 45 a2 f7 1a 92 d3 f4 48 0b 8d f0 f2 ac 46 49 24 7b 34 8f 9d 41 63 90 06 11 71 b7 60 8f 1f b3 df c9 6d 74 44 9c f0 f6 21 f7 9f 42 b9 13 74 fb 22 c7 34 65 85 c2 09 0f 77 3e 0e d3 dd 8f 45 4c 9d ac 60 fe 12 20 aa 11 85 5c 33 45 6b 18 45 8e f2 3a 60 a4 eb ed aa 27 5e 53 7b d1 75 6a 50 4d 8e 27 d7 75 31 76 92 07 b0 15 42 15 92 71 a5 cf 0c ac d5 db a7 2b 29 a0 8f 66 8c 3a d0 4a 5d 5a 12 19 65 08 72 20 96 a0 74 12 f0 d0
e: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
DARLING CRYPTO IMPL: void cczp_init(cczp_t)
m: 19 b9 1b d0 fb 7b 3e 01 cd 9c bb cd 11 97 82 a2 3e 09 20 dd a0 15 83 d7 a6 49 a4 2e dd 9a 9f eb 2d b6 44 46 26 83 15 f5 21 89 05 83 7d e0 86 a6 12 4f 48 11 84 7f a3 9d 92 9d 0d 30 ad 27 e6 a5 14 4e d4 88 87 c8 3f 2b 3c 3c f7 30 9e 9d 7d dc 3c a0 b3 57 f0 63 d5 16 c3 f8 13 a2 86 33 34 a2 2e 86 01 30 3f 6c 8c 8c 77 0b 01 60 43 ed 31 df 10 e4 dc f5 00 ba 29 86 0b 5d e1 90 99 12 46 46 db ba 22 cf d8 7e c1 7d 8d 0d 12 c1 73 ca ab 00 3b c0 b7 66 79 44 ca 72 04 e7 8b be 58 56 49 aa 01 9a 37 15 40 da 99 c3 03 df 1e b8 27 61 ab 1e e9 2f f3 47 52 eb 54 f8 d2 8b 08 93 7a 37 cf 31 3f 13 d9 cd c9 56 f8 23 38 16 fa 0b 4f 93 8d b4 35 c1 5d 75 ef 58 fb d3 e4 e6 50 05 6d 48 98 33 a5 74 9a ba 59 9e b7 1d ea f1 40 9a 93 0c 9f 64 b4 d1 5e 5d cd b1 6c 3f e6 ad 3c 77 9b d4 60 4f
em: 4f 60 d4 9b 77 3c ad e6 3f 6c b1 cd 5d 5e d1 b4 64 9f 0c 93 9a 40 f1 ea 1d b7 9e 59 ba 9a 74 a5 33 98 48 6d 05 50 e6 e4 d3 fb 58 ef 75 5d c1 35 b4 8d 93 4f 0b fa 16 38 23 f8 56 c9 cd d9 13 3f 31 cf 37 7a 93 08 8b d2 f8 54 eb 52 47 f3 2f e9 1e ab 61 27 b8 1e df 03 c3 99 da 40 15 37 9a 01 aa 49 56 58 be 8b e7 04 72 ca 44 79 66 b7 c0 3b 00 ab ca 73 c1 12 0d 8d 7d c1 7e d8 cf 22 ba db 46 46 12 99 90 e1 5d 0b 86 29 ba 00 f5 dc e4 10 df 31 ed 43 60 01 0b 77 8c 8c 6c 3f 30 01 86 2e a2 34 33 86 a2 13 f8 c3 16 d5 63 f0 57 b3 a0 3c dc 7d 9d 9e 30 f7 3c 3c 2b 3f c8 87 88 d4 4e 14 a5 e6 27 ad 30 0d 9d 92 9d a3 7f 84 11 48 4f 12 a6 86 e0 7d 83 05 89 21 f5 15 83 26 46 44 b6 2d eb 9f 9a dd 2e a4 49 a6 d7 83 15 a0 dd 20 09 3e a2 82 97 11 cd bb 9c cd 01 3e 7b fb d0 1b b9 19
em_prime: 00 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 55 fc 62 0f d6 29 64 0d 0a 9d 31 00 d1 72 c6 ca 46 90 a0 e7 a7 86 21 27 3a 32 e8 05 29 db 95 bb
int ccrsa_verify_pkcs1v15(ccrsa_pub_ctx_t, const uint8_t *, size_t, const uint8_t *, size_t, const uint8_t *, _Bool *): em != em_prime
curl: (35) Unknown SSL protocol error in connection to www.example.com:-9809
Darling [/Volumes/SystemRoot/home/me/git/darling/build]$ curl https://www.microsoft.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
DARLING CRYPTO IMPL: int ccrsa_verify_pkcs1v15(ccrsa_pub_ctx_t, const uint8_t *, size_t, const uint8_t *, size_t, const uint8_t *, _Bool *)
key: 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 0a 03 00 00 00 00 00 c0 4f 30 8a d6 58 11 43 04 7c 06 a6 5c 89 91 f2 a0 85 20 68 92 1b 9b 41 2f d6 21 77 ec 96 e7 81 16 67 95 94 a3 bb 7d 46 5c 57 26 b9 b2 c2 f0 46 35 8f 1d 9d c9 c0 e0 d0 6e b2 50 f1 61 b6 ea 7e 86 c2 1f 31 8a d1 23 68 05 86 72 53 e5 3f ab 63 31 ff 13 0e 0e 79 fa 91 7d 4e e9 7a 57 57 df b9 81 ed 69 11 d8 dd 2a 4e ee ee 63 e9 83 a8 1f 75 c4 80 12 7c 68 86 07 b6 51 2e d2 2f 61 75 38 34 04 9d c3 9b f3 81 f1 64 4a 88 6f 2e df c6 f8 07 3a fb 55 f8 6c 21 8e 00 13 bb 24 45 96 1d 3d 43 1e c5 d1 b4 f8 ae 9d a6 77 2f 43 87 af 40 cc 55 02 5e a4 48 38 ec dd b1 68 1c 62 a0 a7 fc d9 24 42 b1 a9 b7 f3 b3 8b 2d 6e ee b1 14 c6 27 b9 f9 54 8d 84 cc ee 61 ed 3e 56 cd dd b5 df a9 5c ff 0d 2b bb 1d 72 41 83 65 1a 06 b4 90 21 d7 d0 fb ef 6c a7 3a c3 fb 6f 0e b1 02 1d 4c cd 42 ad 10 d3 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 09 c1 dc a8 7f 00 00 01 00 00 00 00 00 00 00 70 09 c1 dc a8 7f 00 00 00 00 00 00 00 00 3e 00 f0 06 c1 dc a8 7f 00 00 20 0a c1 dc a8 7f 00 00 30 0f c1 dc a8 7f 00 00 01 00 00 00 00 00 00 00 70 08 c1 dc a8 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 c0 39 00 c1 dc a8 7f 00 00 f0 07 c1 dc a8 7f 00 00 20 0a c1 dc a8 7f 00 00 01 00 00 00 00 00 00 00 e0 09 c1 dc a8 7f 00 00 00 00 00 00 00 00 04 00 f0 09 c1 dc a8 7f 00 00 40 0c c1 dc a8 7f 00 00 b0 09 c1 dc a8 7f 00 00 01 00 00 00 00 00 00 00 20 0b c1 dc a8 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 c0 32 00 74 72 69 62 75 74 65 49 44 00 00 00 02 00 04 00 00 00 00 00 00 00 a0 0d c1 dc a8 7f 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
oid: 06 09 60 86 48 01 65 03 04 02 01
digest_len: 32
digest: a5 e9 03 6a 6f a2 b8 8d 11 0a ac f0 3e 62 e1 5a bc c8 d6 5d 1b b3 67 6c 9e 2c 57 38 27 b1 d1 84
sig_len: 256
sig: ad 1b a3 a3 5d ac 45 ea aa 5b c2 bf 63 a6 64 4f d8 d3 11 e7 c3 cf c4 01 c3 a4 23 85 81 9f 97 c3 80 87 b3 db 52 07 c2 b2 12 47 22 3c 01 8b 03 b8 fb 8e 63 d7 e8 40 d3 70 55 4c ca 84 9a 23 02 ba da 7f c4 03 dc 34 98 b0 2e 34 59 6e 53 23 f4 a1 22 50 7c c8 56 dd 3b c9 d0 88 d0 98 c4 fa 3f c3 6c 22 7e ab 69 99 17 d1 6a fb e2 c8 ae 8a 79 bb f5 64 08 bd cf 2c e3 ea 28 fa ac 18 01 42 8b 3c 97 96 10 fb 91 45 06 f8 9e 91 65 ca f4 06 4b ee 3f 9a d1 35 25 72 e9 7a d2 6a 57 b9 0e ea 55 a1 77 be 05 8f a0 bd 03 f0 aa 55 67 3e 00 6d 2c 13 53 dd 36 59 fc f6 13 f8 03 1f 49 2b 11 c0 a5 38 9a f2 0b ba dc b4 f7 9c 62 c9 b8 b9 54 45 70 4a 1b 60 8b 38 cb 7e d6 11 64 dc 3e af 43 d9 7c b5 0e 4f 5a 12 bc d6 8b db 55 34 ce 4a d1 68 18 56 f8 39 6b 86 dc 0f e2 ac 14 28 19 71 22 07 cd ec
n of mod: 32
mod_len: 256
mod: 4f 30 8a d6 58 11 43 04 7c 06 a6 5c 89 91 f2 a0 85 20 68 92 1b 9b 41 2f d6 21 77 ec 96 e7 81 16 67 95 94 a3 bb 7d 46 5c 57 26 b9 b2 c2 f0 46 35 8f 1d 9d c9 c0 e0 d0 6e b2 50 f1 61 b6 ea 7e 86 c2 1f 31 8a d1 23 68 05 86 72 53 e5 3f ab 63 31 ff 13 0e 0e 79 fa 91 7d 4e e9 7a 57 57 df b9 81 ed 69 11 d8 dd 2a 4e ee ee 63 e9 83 a8 1f 75 c4 80 12 7c 68 86 07 b6 51 2e d2 2f 61 75 38 34 04 9d c3 9b f3 81 f1 64 4a 88 6f 2e df c6 f8 07 3a fb 55 f8 6c 21 8e 00 13 bb 24 45 96 1d 3d 43 1e c5 d1 b4 f8 ae 9d a6 77 2f 43 87 af 40 cc 55 02 5e a4 48 38 ec dd b1 68 1c 62 a0 a7 fc d9 24 42 b1 a9 b7 f3 b3 8b 2d 6e ee b1 14 c6 27 b9 f9 54 8d 84 cc ee 61 ed 3e 56 cd dd b5 df a9 5c ff 0d 2b bb 1d 72 41 83 65 1a 06 b4 90 21 d7 d0 fb ef 6c a7 3a c3 fb 6f 0e b1 02 1d 4c cd 42 ad 10 d3
e: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
DARLING CRYPTO IMPL: void cczp_init(cczp_t)
m: 89 a6 ea 45 dc 82 04 fc af 8a ec 6d 4f b6 26 1d 91 c4 55 42 3f ba bf f9 1b b6 a1 ac 00 8c 5d 03 d0 31 33 18 21 e9 6e d6 85 00 78 e3 e6 9d 85 81 64 29 c6 f2 a7 1e 0e 8c 6d 77 88 8c 5a d3 ca 15 40 2c f5 8c 1e 6a 88 40 c5 cf 51 97 47 80 fa 9a c1 cf 56 74 7f de cb 35 f9 84 db 57 7e fc f2 e1 46 bf 59 a5 07 7c 81 89 58 4a 1d 2a e7 fe 11 b2 cd 61 d3 f1 c8 49 6f a3 f8 8d 42 45 c3 39 9d 6e 2e d2 99 91 95 4f 93 da dd e1 42 3f aa 83 30 f1 2e 5a ed 88 15 68 f7 d3 ff 14 e7 1e 76 34 80 83 a9 ba ec 65 42 85 78 bf 47 86 9a b5 11 e8 fa ad fe b5 7f 8e 72 f1 b5 f2 67 04 fb 8a 85 9d 3e 99 99 73 20 3e e1 67 a5 71 53 7a 5c 22 ff a0 cd c9 ab d8 c8 f4 37 87 65 45 70 c2 5d e1 40 03 96 2e 84 0e 29 0a fd 66 7d 79 78 16 01 0c 14 0e 82 47 a2 08 75 c7 c1 56 7d 6e 62 e8 9a db f2 5b 56 c9
em: c9 56 5b f2 db 9a e8 62 6e 7d 56 c1 c7 75 08 a2 47 82 0e 14 0c 01 16 78 79 7d 66 fd 0a 29 0e 84 2e 96 03 40 e1 5d c2 70 45 65 87 37 f4 c8 d8 ab c9 cd a0 ff 22 5c 7a 53 71 a5 67 e1 3e 20 73 99 99 3e 9d 85 8a fb 04 67 f2 b5 f1 72 8e 7f b5 fe ad fa e8 11 b5 9a 86 47 bf 78 85 42 65 ec ba a9 83 80 34 76 1e e7 14 ff d3 f7 68 15 88 ed 5a 2e f1 30 83 aa 3f 42 e1 dd da 93 4f 95 91 99 d2 2e 6e 9d 39 c3 45 42 8d f8 a3 6f 49 c8 f1 d3 61 cd b2 11 fe e7 2a 1d 4a 58 89 81 7c 07 a5 59 bf 46 e1 f2 fc 7e 57 db 84 f9 35 cb de 7f 74 56 cf c1 9a fa 80 47 97 51 cf c5 40 88 6a 1e 8c f5 2c 40 15 ca d3 5a 8c 88 77 6d 8c 0e 1e a7 f2 c6 29 64 81 85 9d e6 e3 78 00 85 d6 6e e9 21 18 33 31 d0 03 5d 8c 00 ac a1 b6 1b f9 bf ba 3f 42 55 c4 91 1d 26 b6 4f 6d ec 8a af fc 04 82 dc 45 ea a6 89
em_prime: 00 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 a5 e9 03 6a 6f a2 b8 8d 11 0a ac f0 3e 62 e1 5a bc c8 d6 5d 1b b3 67 6c 9e 2c 57 38 27 b1 d1 84
int ccrsa_verify_pkcs1v15(ccrsa_pub_ctx_t, const uint8_t *, size_t, const uint8_t *, size_t, const uint8_t *, _Bool *): em != em_prime
curl: (35) Unknown SSL protocol error in connection to www.microsoft.com:-9809
Darling [/Volumes/SystemRoot/home/me/git/darling/build]$ curl https://www.apple.com    
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
DARLING CRYPTO IMPL: int ccrsa_verify_pkcs1v15(ccrsa_pub_ctx_t, const uint8_t *, size_t, const uint8_t *, size_t, const uint8_t *, _Bool *)
key: 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0 0a 03 00 00 00 00 00 f0 2f 35 21 b0 03 af 45 54 1a e5 ea 27 35 48 d4 1d c7 ad dd 1d b0 15 6e 21 8d 9b 59 e8 54 6f 54 a9 67 dd 24 53 a9 62 fb 07 70 08 fc 36 ed 4d 46 04 4f d5 89 bd 95 18 cf 39 40 9e 0f 20 25 54 ae fb bf f0 39 c9 83 cb 24 8f 3d 9b c1 b1 97 a8 42 c9 dc 25 ab c8 06 e5 34 19 7e c5 4f 50 be cc 0d 03 44 5a c7 17 e3 12 92 54 51 fb b0 3b c5 a7 61 4a 43 44 15 5f 10 be 26 aa 45 7a ba 69 86 ec 5b 5f 90 c8 b9 3d 6f b5 bf 84 0b 6e 73 e9 44 8c db ce da 61 aa d8 55 ed 3f 59 11 89 16 a1 c5 63 cd d7 e9 09 d8 31 58 80 72 6b 77 19 8f 99 b7 0c cc 26 64 1d 8a 1a 5a f6 ca 9c 41 8d bc 2e 6c af f8 74 8e f3 69 e9 21 b5 a4 25 b7 e3 44 1c d1 30 74 fe 8b 1e 45 41 bc ab b3 56 b2 c8 b8 d4 a5 10 5f ba bd 5a 70 ca 77 bb 9e 4d e3 e7 36 df c6 07 39 a8 0e 4e 2c 99 ec 28 29 98 e7 73 32 56 73 a6 b6 a2 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0 09 41 70 9f 7f 00 00 01 00 00 00 00 00 00 00 30 0a 41 70 9f 7f 00 00 00 00 00 00 00 00 3e 00 b0 07 41 70 9f 7f 00 00 e0 0a 41 70 9f 7f 00 00 f0 0f 41 70 9f 7f 00 00 01 00 00 00 00 00 00 00 30 09 41 70 9f 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 f0 00 00 00 00 00 00 00 f0 39 00 41 70 9f 7f 00 00 b0 08 41 70 9f 7f 00 00 e0 0a 41 70 9f 7f 00 00 01 00 00 00 00 00 00 00 a0 0a 41 70 9f 7f 00 00 00 00 00 00 00 00 04 00 b0 0a 41 70 9f 7f 00 00 00 0d 41 70 9f 7f 00 00 70 0a 41 70 9f 7f 00 00 01 00 00 00 00 00 00 00 e0 0b 41 70 9f 7f 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 f0 00 00 00 00 00 00 00 f0 32 00 74 72 69 62 75 74 65 49 44 00 00 00 02 00 04 00 00 00 00 00 00 00 60 0e 41 70 9f 7f 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
oid: 06 09 60 86 48 01 65 03 04 02 01
digest_len: 32
digest: 85 74 f3 34 76 12 58 66 ca 8d 37 d0 51 e0 ac 90 ea 9d c3 fa 80 7b f8 d3 0b 24 12 d8 fe fa 1f 7d
sig_len: 256
sig: 44 59 34 b1 63 67 35 ed 57 79 70 26 2d e2 77 70 9f 2b 4a 67 22 bd b5 ab 59 72 fe e2 ca e4 7e 93 a2 ef 5a 35 be 7e 92 47 71 54 22 37 b0 ec 89 39 bd 69 fb b3 43 1d b0 c7 92 94 38 38 e2 08 3f 3c 53 02 99 08 13 fd 63 32 a0 2c 16 e5 1f 2f c8 81 f9 5f 6e 05 92 16 cd af 7f ad 00 ce 60 9e ef 84 eb 31 88 75 44 f4 02 83 24 e1 7f 74 d7 a9 d4 88 c7 cb 5c c9 19 41 4a 85 40 47 d0 5d 5b d4 2c 88 27 a9 3d 99 a6 2a 9e 20 89 b8 43 70 be a7 a6 fe f9 5f 7c 73 47 59 d9 54 1a bc 5b 54 a5 05 2d 0f db 4c bc c1 16 02 3a df 96 85 a0 27 56 2d 2c 59 d2 b4 1d 09 f3 29 8a 1b 17 17 35 b1 4f dc e4 c3 dc d9 17 9e 17 80 39 fa 36 6d 08 83 7b cf 3d 7b 55 6d 83 f1 2e 4c 64 5e b1 14 8b c2 52 58 5f bb e5 32 90 8c a4 5d 7f 0c 1d d7 8d f9 67 9f db f7 92 e7 1d 2f 37 07 1b ae c2 f2 de bb 81 d9 a4 05
n of mod: 32
mod_len: 256
mod: 2f 35 21 b0 03 af 45 54 1a e5 ea 27 35 48 d4 1d c7 ad dd 1d b0 15 6e 21 8d 9b 59 e8 54 6f 54 a9 67 dd 24 53 a9 62 fb 07 70 08 fc 36 ed 4d 46 04 4f d5 89 bd 95 18 cf 39 40 9e 0f 20 25 54 ae fb bf f0 39 c9 83 cb 24 8f 3d 9b c1 b1 97 a8 42 c9 dc 25 ab c8 06 e5 34 19 7e c5 4f 50 be cc 0d 03 44 5a c7 17 e3 12 92 54 51 fb b0 3b c5 a7 61 4a 43 44 15 5f 10 be 26 aa 45 7a ba 69 86 ec 5b 5f 90 c8 b9 3d 6f b5 bf 84 0b 6e 73 e9 44 8c db ce da 61 aa d8 55 ed 3f 59 11 89 16 a1 c5 63 cd d7 e9 09 d8 31 58 80 72 6b 77 19 8f 99 b7 0c cc 26 64 1d 8a 1a 5a f6 ca 9c 41 8d bc 2e 6c af f8 74 8e f3 69 e9 21 b5 a4 25 b7 e3 44 1c d1 30 74 fe 8b 1e 45 41 bc ab b3 56 b2 c8 b8 d4 a5 10 5f ba bd 5a 70 ca 77 bb 9e 4d e3 e7 36 df c6 07 39 a8 0e 4e 2c 99 ec 28 29 98 e7 73 32 56 73 a6 b6 a2
e: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
DARLING CRYPTO IMPL: void cczp_init(cczp_t)
m: 7d 1f fa fe d8 12 24 0b d3 f8 7b 80 fa c3 9d ea 90 ac e0 51 d0 37 8d ca 66 58 12 76 34 f3 74 85 20 04 00 05 01 02 04 03 65 01 48 86 60 09 06 0d 30 31 30 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 00
em: 00 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 85 74 f3 34 76 12 58 66 ca 8d 37 d0 51 e0 ac 90 ea 9d c3 fa 80 7b f8 d3 0b 24 12 d8 fe fa 1f 7d
em_prime: 00 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 85 74 f3 34 76 12 58 66 ca 8d 37 d0 51 e0 ac 90 ea 9d c3 fa 80 7b f8 d3 0b 24 12 d8 fe fa 1f 7d
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Looks like I forgot to check against a bigger pool of data before. I'll have to review my code.

LubosD commented 4 years ago

I also wonder if the new crypto infrastructure uses the same set of trusted certs as openssl?

Something's telling me it might be looking for system keychains, so the last failure may have a different reason.

facekapow commented 4 years ago

Yeah, the last error is due to not finding the certificate authority in the system list of trusted CAs, but I was actually using that as an example of success (of the ccrsa_verify_pkcs1v15 function). It seems that only apple.com passes the verification and I don't see why.

Edit: It's definitely something wrong with the cczp_power function; using the following sample signature, modulus, and exponent from example.com in Python's pow function works as expected:

s = int('c7cf36eefd4c0a926f9b0acd134b3a7c52eba82bdcbf95df9a6da9c0f95cdeaf27c951a7d05d51ba1a78da1dde42541c6d2366b442cb6c86e00d6e1000d95387f7c0894fdca958339e28fc554c802785580f1de222c2498e04fcbe4a8602408c0f9c24a1f4f00026e137c42ff4b374590853cc8c33dcf897f67d3fb4b7851e0e3946960baa79a023da592980161530fcb98a0ac611eb3564c9cb6494633ffa2ed7b1924c7afac8164aafcb270cec78d81d9f07e0944185a15ddd162743bbeab367e54fe85a898d3ec04fc1cfacb15972ccca29cb26203200461f97c7f841623ef1c97405f9b0b8080134ad1af1c6e59e0622b8a4e75f2aac4abe8307b4a48587', 16)
m = int('d0f01274a0962072086519125a5d4ad03a8c668fa0292ba7dbd5ac0ccfa57192154215b00792763175d7278e4d506a75d17b535e27aaedeba4603af28e45186b45335c8511aa2012fe60ac9d4c458fddd30e3e770f09c2856534c722fb7413b9429ff721f6f09c44746dc9dfb31f8f60b77111069063419d8f347b244946acf2f08d0b48f4d3921af7a245eecce5d7837f2e82bd71dd281958336e11a13aa06a72609201599f63177a49427b9c3fdbd305e8cc877ef8aafc9dd10550ab75b11eba20cb89d46d6c3782284cc53f7cc110f5a0a5666b5353c9dbed85c36d05f864a7c90eeb8fe1c4b1eb2d680e153fe5e2dcfc21642dee692b0478db7765cb54f9', 16)
e = int('00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001', 16)
h = pow(s, e, m)
print(hex(h))
# prints "0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004209a7015da0d2adbbdeaf199caa39deee15e750b59c2ced3a797b0b4ac680319f7L"
ahyattdev commented 4 years ago

Great progress!

facekapow commented 4 years ago

:tada: RSA signature verification is now working properly with my latest commit in darlinghq/darling-corecrypto#6! :tada:

Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl https://www.apple.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 21000000000000000000000000000010f09a39f5ff7f00002f3521b003af45541ae5ea273548d41dc7addd1db0156e218d9b59e8546f54a967dd2453a962fb077008fc36ed4d46044fd589bd9518cf39409e0f202554aefbbff039c983cb248f3d9bc1b197a842c9dc25abc806e534197ec54f50becc0d03445ac717e312925451fbb03bc5a7614a4344155f10be26aa457aba6986ec5b5f90c8b93d6fb5bf840b6e73e9448cdbceda61aad855ed3f59118916a1c563cdd7e909d8315880726b77198f99b70ccc26641d8a1a5af6ca9c418dbc2e6caff8748ef369e921b5a425b7e3441cd13074fe8b1e4541bcabb356b2c8b8d4a5105fbabd5a70ca77bb9e4de3e736dfc60739a80e4e2c99ec282998e773325673a6b6a20000000000000000db169649a6c5e4aec6aff6dede813a06186373f4ef9bb5ce2ddedb17f4e359dcb87573adde7c12a297729a8b0ada133958d17288cd102db71fd2c2b2d81c809d7088b90c2e9f919eeb16c8ceb36da6706f46456e25168d24b04ee1871d7364d179405d31524a97a9e0e6912a64dfd0ae98801d933140680248183b00f36c7ecbde3d2619d48979eb2d7763c302046b3110380a8b633f0621b77fe215f93daeb3409db1f97a57a695343d86fc0e8ecfd581fcbeaa30c8f4eb80cb7d399e57fe0b1f297a3fa67241ee06084c13fa821bc710d017032cffb1ec8c14a39b7c6f28f9c3ba74e59114f561dcca5b7b8471569cc75ab2b3ea1d151ce3197b4584f3c49201000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: b0afbc65225f2e94f272852a35ffe68dc9f07cc73cb5ca1decd896857463274e
sig_len: 256
sig (big endian): 27e472efbf29561aaf7de58959be81ffa69db305086b01874aa96403d6ef7a0ce6c1d0fda804000283b72ae329f5c87d57aadd7d3c9a98377a7452e9c2b8c5d4306ec7836b842499f5bc3d037f26f1388c7ae20dfc17fc8d5584476742575c24200df5c0a1584146209dc938a018fd3dc9ddef3898ac37d2a0f9a6f87ae082059d7f70fcca06b08c18d17c0884eef4200da526a986c576d74b946fdc2e8d635c3cbd4a7cb80b653bcd5a29465b2c4de13c1883d9afa619fa7553c87e82dcd4aea210e04dbda34a2a21f131b6df1726b6349a4f1b13d24884604c6d1191223a9d65536ae80835c3d17bc60ad4b51cb4c20afa68a79f9d5b2364dc9bb0b4d0621a
n of mod: 33
mod_len: 256
mod (little endian): 2f3521b003af45541ae5ea273548d41dc7addd1db0156e218d9b59e8546f54a967dd2453a962fb077008fc36ed4d46044fd589bd9518cf39409e0f202554aefbbff039c983cb248f3d9bc1b197a842c9dc25abc806e534197ec54f50becc0d03445ac717e312925451fbb03bc5a7614a4344155f10be26aa457aba6986ec5b5f90c8b93d6fb5bf840b6e73e9448cdbceda61aad855ed3f59118916a1c563cdd7e909d8315880726b77198f99b70ccc26641d8a1a5af6ca9c418dbc2e6caff8748ef369e921b5a425b7e3441cd13074fe8b1e4541bcabb356b2c8b8d4a5105fbabd5a70ca77bb9e4de3e736dfc60739a80e4e2c99ec282998e773325673a6b6a20000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): db169649a6c5e4aec6aff6dede813a06186373f4ef9bb5ce2ddedb17f4e359dcb87573adde7c12a297729a8b0ada133958d17288cd102db71fd2c2b2d81c809d7088b90c2e9f919eeb16c8ceb36da6706f46456e25168d24b04ee1871d7364d179405d31524a97a9e0e6912a64dfd0ae98801d933140680248183b00f36c7ecbde3d2619d48979eb2d7763c302046b3110380a8b633f0621b77fe215f93daeb3409db1f97a57a695343d86fc0e8ecfd581fcbeaa30c8f4eb80cb7d399e57fe0b1f297a3fa67241ee06084c13fa821bc710d017032cffb1ec8c14a39b7c6f28f9c3ba74e59114f561dcca5b7b8471569cc75ab2b3ea1d151ce3197b4584f3c49201000000000000000000000000000000
mod (big endian): 0000000000000000a2b6a673563273e7982928ec992c4e0ea83907c6df36e7e34d9ebb77ca705abdba5f10a5d4b8c8b256b3abbc41451e8bfe7430d11c44e3b725a4b521e969f38e74f8af6c2ebc8d419ccaf65a1a8a1d6426cc0cb7998f19776b72805831d809e9d7cd63c5a1168911593fed55d8aa61dacedb8c44e9736e0b84bfb56f3db9c8905f5bec8669ba7a45aa26be105f1544434a61a7c53bb0fb51549212e317c75a44030dccbe504fc57e1934e506c8ab25dcc942a897b1c19b3d8f24cb83c939f0bffbae5425200f9e4039cf1895bd89d54f04464ded36fc087007fb62a95324dd67a9546f54e8599b8d216e15b01dddadc71dd4483527eae51a5445af03b021352f
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 0000000000000000000000000000000192c4f384457b19e31c151deab3b25ac79c5671847b5bcadc61f51491e574bac3f9286f7c9ba3148cecb1ff2c0317d010c71b82fa134c0806ee4172a63f7a291f0bfe579e397dcb80ebf4c830aabefc81d5cf8e0efc863d3495a6577af9b19d40b3ae3df915e27fb721063f638b0a3810316b0402c363772deb7989d419263ddecb7e6cf3003b184802684031931d8098aed0df642a91e6e0a9974a52315d4079d164731d87e14eb0248d16256e45466f70a66db3cec816eb9e919f2e0cb988709d801cd8b2c2d21fb72d10cd8872d1583913da0a8b9a7297a2127cdead7375b8dc59e3f417dbde2dceb59beff4736318063a81dedef6afc6aee4c5a6499616db
m (little endian): 4e2763748596d8ec1dcab53cc77cf0c98de6ff352a8572f2942e5f2265bcafb02004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420b0afbc65225f2e94f272852a35ffe68dc9f07cc73cb5ca1decd896857463274e
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420b0afbc65225f2e94f272852a35ffe68dc9f07cc73cb5ca1decd896857463274e
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl https://www.example.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 21000000000000000000000000000020f09a39f5ff7f0000f954cb6577db78042b69ee2d6421fcdce2e53f150e682debb1c4e18feb0ec9a764f8056dc385eddbc953536b66a5a0f510c17c3fc54c2882376c6dd489cb20ba1eb175ab5005d19dfcaaf87e87cce805d3db3f9c7b42497a17639f59019260726aa03aa1116e33581928dd71bd822e7f83d7e5ccee45a2f71a92d3f4480b8df0f2ac4649247b348f9d416390061171b7608f1fb3dfc96d74449cf0f621f79f42b91374fb22c7346585c2090f773e0ed3dd8f454c9dac60fe1220aa11855c33456b18458ef23a60a4ebedaa275e537bd1756a504d8e27d77531769207b01542159271a5cf0cacd5dba72b29a08f668c3ad04a5d5a12196508722096a07412f0d00000000000000000d318367d0aef62d24d70ba1e791e78ef714d3fe4ee5f6e5eb1843cc3ecd6735ef84fb1060508ec50c07a2f9e7cb2f2ae989a66ccdb75091c149860dcf7e62902ac62d3da6796a824a9c0453098f4862152c11eaf44cc388ce6d34d01dab8d62247165df89192fe4ce10d9591827a2f5c9ffc1d8dc0c54f874bc177ffc40abc1ba1a93e30f80de5c98339d6473627abc49e2b3f261e04f1d3d0d60eab0c28bf92797bf55378b1a7e6877c2318918fadcc369182fac33e66018cc4b9e7fd04a402512d06130beb186e50fd6fcb9d8e54b0287bc1e433e8cb0eaa0a540cb3d1bb90eb97c44b2e79cc3041df30f1e8fc1a7865a8e4a9bad7bea3b6c040773faaa93901000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: e496bd6c24c45781c7abffb6a08bf10aed9eae7e6336e79ee03ffb5e902661be
sig_len: 256
sig (big endian): ccc155f1250bd1c8aba04f22cb6e4081572be87725542e09f89dd154c1acfde70661f968cd5dc8a3365d3fd34f15cc071ec30305a3a6d52cf194555691d56358422bda26adf64e66b51e9c972993092b5ccc99daeb18fd5460268ae09c145e4a9a1c1f50db45bfffc57caa3646b95d76039989c258317a8aba98f6ea4b60ea692845e2674ef0b862731ce97256ae5ce69cdca20250f6526083303afbabf47c025c6cfbe9800ac7b8b612f3f9b5ac29f80acc4ef2e7fc68a32971e9cae34461ed1d0f4d4e3e0bb3cee3bf93c8f059289d3151304221e6ac450615f1f25499700614fae7ee02004d82a12a60013695c51da6de86f6430388de24ecebec175aaa6e
n of mod: 33
mod_len: 256
mod (little endian): f954cb6577db78042b69ee2d6421fcdce2e53f150e682debb1c4e18feb0ec9a764f8056dc385eddbc953536b66a5a0f510c17c3fc54c2882376c6dd489cb20ba1eb175ab5005d19dfcaaf87e87cce805d3db3f9c7b42497a17639f59019260726aa03aa1116e33581928dd71bd822e7f83d7e5ccee45a2f71a92d3f4480b8df0f2ac4649247b348f9d416390061171b7608f1fb3dfc96d74449cf0f621f79f42b91374fb22c7346585c2090f773e0ed3dd8f454c9dac60fe1220aa11855c33456b18458ef23a60a4ebedaa275e537bd1756a504d8e27d77531769207b01542159271a5cf0cacd5dba72b29a08f668c3ad04a5d5a12196508722096a07412f0d00000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): d318367d0aef62d24d70ba1e791e78ef714d3fe4ee5f6e5eb1843cc3ecd6735ef84fb1060508ec50c07a2f9e7cb2f2ae989a66ccdb75091c149860dcf7e62902ac62d3da6796a824a9c0453098f4862152c11eaf44cc388ce6d34d01dab8d62247165df89192fe4ce10d9591827a2f5c9ffc1d8dc0c54f874bc177ffc40abc1ba1a93e30f80de5c98339d6473627abc49e2b3f261e04f1d3d0d60eab0c28bf92797bf55378b1a7e6877c2318918fadcc369182fac33e66018cc4b9e7fd04a402512d06130beb186e50fd6fcb9d8e54b0287bc1e433e8cb0eaa0a540cb3d1bb90eb97c44b2e79cc3041df30f1e8fc1a7865a8e4a9bad7bea3b6c040773faaa93901000000000000000000000000000000
mod (big endian): 0000000000000000d0f01274a0962072086519125a5d4ad03a8c668fa0292ba7dbd5ac0ccfa57192154215b00792763175d7278e4d506a75d17b535e27aaedeba4603af28e45186b45335c8511aa2012fe60ac9d4c458fddd30e3e770f09c2856534c722fb7413b9429ff721f6f09c44746dc9dfb31f8f60b77111069063419d8f347b244946acf2f08d0b48f4d3921af7a245eecce5d7837f2e82bd71dd281958336e11a13aa06a72609201599f63177a49427b9c3fdbd305e8cc877ef8aafc9dd10550ab75b11eba20cb89d46d6c3782284cc53f7cc110f5a0a5666b5353c9dbed85c36d05f864a7c90eeb8fe1c4b1eb2d680e153fe5e2dcfc21642dee692b0478db7765cb54f9
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 0000000000000000000000000000000139a9aa3f7740c0b6a3bed7baa9e4a865781afce8f130df4130cc792e4bc497eb90bbd1b30c540aaa0ecbe833e4c17b28b0548e9dcb6ffd506e18eb0b13062d5102a404fde7b9c48c01663ec3fa829136ccad8f9118237c87e6a7b17853f57b7992bf280cab0ed6d0d3f1041e263f2b9ec4ab273647d63983c9e50df8303ea9a11bbc0ac4ff77c14b874fc5c08d1dfc9f5c2f7a8291950de14cfe9291f85d164722d6b8da014dd3e68c38cc44af1ec1522186f4983045c0a924a89667dad362ac0229e6f7dc6098141c0975dbcc669a98aef2b27c9e2f7ac050ec080506b14ff85e73d6ecc33c84b15e6e5feee43f4d71ef781e791eba704dd262ef0a7d3618d3
m (little endian): be6126905efb3fe09ee736637eae9eed0af18ba0b6ffabc78157c4246cbd96e42004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420e496bd6c24c45781c7abffb6a08bf10aed9eae7e6336e79ee03ffb5e902661be
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420e496bd6c24c45781c7abffb6a08bf10aed9eae7e6336e79ee03ffb5e902661be
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl https://www.microsoft.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 21000000000000000000000000000080f09a39f5ff7f00004f308ad6581143047c06a65c8991f2a0852068921b9b412fd62177ec96e78116679594a3bb7d465c5726b9b2c2f046358f1d9dc9c0e0d06eb250f161b6ea7e86c21f318ad1236805867253e53fab6331ff130e0e79fa917d4ee97a5757dfb981ed6911d8dd2a4eeeee63e983a81f75c480127c688607b6512ed22f61753834049dc39bf381f1644a886f2edfc6f8073afb55f86c218e0013bb2445961d3d431ec5d1b4f8ae9da6772f4387af40cc55025ea44838ecddb1681c62a0a7fcd92442b1a9b7f3b38b2d6eeeb114c627b9f9548d84ccee61ed3e56cdddb5dfa95cff0d2bbb1d724183651a06b49021d7d0fbef6ca73ac3fb6f0eb1021d4ccd42ad10d3000000000000000031c5e167140de80305c46ad4266f0db508ea0a135298e7bd440ff1e4a4af6483e4d4dbde2c324f2abb4948952299269a4e47224258957ab818a6c1cad67577de1df35bf2611a796b04848a736cd5a8569d6804118691e8331b07b142c34df00324b7d67b0d4fb0f35becb1fb8e6289725cace95cfe5ac59905eea037f6403d2a682709ac026dc1510c85e69dafa62f7b1d740bf72edb2a16c3f6377f6084f6ef53ab41eb850969e3065cfd1081b9b96de43415c3f7fca176ef0241bd1fcd4fce4b151cba76ae38dba38d3925321ecbbda5c321b6af082e6af0233f3a7217710e84aa695d9d0f40f9daf9c62d4680767a1b4cff24124e82dc99551694b954803601000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: 0188078dbda123e867a0de6e8b613bc5263987d7ce3d8fb8549db4b52d015892
sig_len: 256
sig (big endian): 2e8db41c4200c0ede5e61f4812a705a0bd8d10844fcad2d887b22a25b410c64f69fc8be95c38ea49db69017da8262c7f0f471279bd3cbf7616ec2b12784616c21c0077f5f118586c6e3f3981a06ff1506410134aeaf85cee49fa60b05b727550ef540a675738f5ce04b0e9f43046e50f9daaec3493ef2fc03dac4f13d841f3cab2d6f20db2fdb46269cb55f928d5a2b01f579679c55126d74c07c75181236ceef2e5f51c176a2972b4b896578273bc2cd97a38f709852e7eeb2895996787dd64269472d575d98b822c6ea3a7c131f1e5d90780b87d3e3998ec45271658d271c261a254d3565aac4f05a05c9bff35558cef210faa55e7879dd28f5f693540ea2f
n of mod: 33
mod_len: 256
mod (little endian): 4f308ad6581143047c06a65c8991f2a0852068921b9b412fd62177ec96e78116679594a3bb7d465c5726b9b2c2f046358f1d9dc9c0e0d06eb250f161b6ea7e86c21f318ad1236805867253e53fab6331ff130e0e79fa917d4ee97a5757dfb981ed6911d8dd2a4eeeee63e983a81f75c480127c688607b6512ed22f61753834049dc39bf381f1644a886f2edfc6f8073afb55f86c218e0013bb2445961d3d431ec5d1b4f8ae9da6772f4387af40cc55025ea44838ecddb1681c62a0a7fcd92442b1a9b7f3b38b2d6eeeb114c627b9f9548d84ccee61ed3e56cdddb5dfa95cff0d2bbb1d724183651a06b49021d7d0fbef6ca73ac3fb6f0eb1021d4ccd42ad10d30000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): 31c5e167140de80305c46ad4266f0db508ea0a135298e7bd440ff1e4a4af6483e4d4dbde2c324f2abb4948952299269a4e47224258957ab818a6c1cad67577de1df35bf2611a796b04848a736cd5a8569d6804118691e8331b07b142c34df00324b7d67b0d4fb0f35becb1fb8e6289725cace95cfe5ac59905eea037f6403d2a682709ac026dc1510c85e69dafa62f7b1d740bf72edb2a16c3f6377f6084f6ef53ab41eb850969e3065cfd1081b9b96de43415c3f7fca176ef0241bd1fcd4fce4b151cba76ae38dba38d3925321ecbbda5c321b6af082e6af0233f3a7217710e84aa695d9d0f40f9daf9c62d4680767a1b4cff24124e82dc99551694b954803601000000000000000000000000000000
mod (big endian): 0000000000000000d310ad42cd4c1d02b10e6ffbc33aa76ceffbd0d72190b4061a658341721dbb2b0dff5ca9dfb5ddcd563eed61eecc848d54f9b927c614b1ee6e2d8bb3f3b7a9b14224d9fca7a0621c68b1ddec3848a45e0255cc40af87432f77a69daef8b4d1c51e433d1d964524bb13008e216cf855fb3a07f8c6df2e6f884a64f181f39bc39d04343875612fd22e51b60786687c1280c4751fa883e963eeee4e2addd81169ed81b9df57577ae94e7d91fa790e0e13ff3163ab3fe5537286056823d18a311fc2867eeab661f150b26ed0e0c0c99d1d8f3546f0c2b2b926575c467dbba39495671681e796ec7721d62f419b1b92682085a0f291895ca6067c04431158d68a304f
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 00000000000000000000000000000001368054b994165599dc824e1224ff4c1b7a7680462dc6f9daf9400f9d5d69aa840e7117723a3f23f06a2e08afb621c3a5bdcb1e3225398da3db38ae76ba1c154bce4fcd1fbd4102ef76a1fcf7c31534e46db9b98110fd5c06e3690985eb41ab53eff684607f37f6c3162adb2ef70b741d7b2fa6af9de6850c51c16d02ac0927682a3d40f637a0ee0599c55afe5ce9ac5c7289628efbb1ec5bf3b04f0d7bd6b72403f04dc342b1071b33e891861104689d56a8d56c738a84046b791a61f25bf31dde7775d6cac1a618b87a95584222474e9a269922954849bb2a4f322cdedbd4e48364afa4e4f10f44bde79852130aea08b50d6f26d46ac40503e80d1467e1c531
m (little endian): 9258012db5b49d54b88f3dced7873926c53b618b6edea067e823a1bd8d0788012004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004200188078dbda123e867a0de6e8b613bc5263987d7ce3d8fb8549db4b52d015892
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004200188078dbda123e867a0de6e8b613bc5263987d7ce3d8fb8549db4b52d015892
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Still fails on the check for certificate authorities trusted by the system, but for now, for debugging purposes, I'll just use the -k option. We can worry about trusting CAs later.

With the -k option:

Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl -k https://www.apple.com    
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 21000000000000000000000000000080f09a39f5ff7f00002f3521b003af45541ae5ea273548d41dc7addd1db0156e218d9b59e8546f54a967dd2453a962fb077008fc36ed4d46044fd589bd9518cf39409e0f202554aefbbff039c983cb248f3d9bc1b197a842c9dc25abc806e534197ec54f50becc0d03445ac717e312925451fbb03bc5a7614a4344155f10be26aa457aba6986ec5b5f90c8b93d6fb5bf840b6e73e9448cdbceda61aad855ed3f59118916a1c563cdd7e909d8315880726b77198f99b70ccc26641d8a1a5af6ca9c418dbc2e6caff8748ef369e921b5a425b7e3441cd13074fe8b1e4541bcabb356b2c8b8d4a5105fbabd5a70ca77bb9e4de3e736dfc60739a80e4e2c99ec282998e773325673a6b6a20000000000000000db169649a6c5e4aec6aff6dede813a06186373f4ef9bb5ce2ddedb17f4e359dcb87573adde7c12a297729a8b0ada133958d17288cd102db71fd2c2b2d81c809d7088b90c2e9f919eeb16c8ceb36da6706f46456e25168d24b04ee1871d7364d179405d31524a97a9e0e6912a64dfd0ae98801d933140680248183b00f36c7ecbde3d2619d48979eb2d7763c302046b3110380a8b633f0621b77fe215f93daeb3409db1f97a57a695343d86fc0e8ecfd581fcbeaa30c8f4eb80cb7d399e57fe0b1f297a3fa67241ee06084c13fa821bc710d017032cffb1ec8c14a39b7c6f28f9c3ba74e59114f561dcca5b7b8471569cc75ab2b3ea1d151ce3197b4584f3c49201000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: ec045137f6bd349e2ea39f0540ec2f4e8584dfc283ce7c28f994a8eaa90c356a
sig_len: 256
sig (big endian): 68579e5805f0e6ac05e52b76f88b9a2aae3240385c3ccd146611d73ff36b76e850cff627dcadb98d8f06dca099919d93bcd1951d5d0b87d5cb97cb04641c8effc59dc074096ff87c8fb9a2ecc086202fecffddf367b7470ddfafb1d9a043624e3b4b93226fc88725379847af98a78643de365fa3512c73b94a006f16f32c4c78931235defaf418c1ef11d267c0916ded5916232eeb926f8eca359d37d826282820d2929367357a456f1df86f8843df9e84da9c3456e7c8c3ccd3f1707d18b489750be48b079bccf119966169d39c5d58acd2bba696bd0293254f1078d12e1d8e0b71d849c898cbb0c41a52526c823f7e7bfba828f5df23e6ed5eafb0d9b71c43
n of mod: 33
mod_len: 256
mod (little endian): 2f3521b003af45541ae5ea273548d41dc7addd1db0156e218d9b59e8546f54a967dd2453a962fb077008fc36ed4d46044fd589bd9518cf39409e0f202554aefbbff039c983cb248f3d9bc1b197a842c9dc25abc806e534197ec54f50becc0d03445ac717e312925451fbb03bc5a7614a4344155f10be26aa457aba6986ec5b5f90c8b93d6fb5bf840b6e73e9448cdbceda61aad855ed3f59118916a1c563cdd7e909d8315880726b77198f99b70ccc26641d8a1a5af6ca9c418dbc2e6caff8748ef369e921b5a425b7e3441cd13074fe8b1e4541bcabb356b2c8b8d4a5105fbabd5a70ca77bb9e4de3e736dfc60739a80e4e2c99ec282998e773325673a6b6a20000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): db169649a6c5e4aec6aff6dede813a06186373f4ef9bb5ce2ddedb17f4e359dcb87573adde7c12a297729a8b0ada133958d17288cd102db71fd2c2b2d81c809d7088b90c2e9f919eeb16c8ceb36da6706f46456e25168d24b04ee1871d7364d179405d31524a97a9e0e6912a64dfd0ae98801d933140680248183b00f36c7ecbde3d2619d48979eb2d7763c302046b3110380a8b633f0621b77fe215f93daeb3409db1f97a57a695343d86fc0e8ecfd581fcbeaa30c8f4eb80cb7d399e57fe0b1f297a3fa67241ee06084c13fa821bc710d017032cffb1ec8c14a39b7c6f28f9c3ba74e59114f561dcca5b7b8471569cc75ab2b3ea1d151ce3197b4584f3c49201000000000000000000000000000000
mod (big endian): 0000000000000000a2b6a673563273e7982928ec992c4e0ea83907c6df36e7e34d9ebb77ca705abdba5f10a5d4b8c8b256b3abbc41451e8bfe7430d11c44e3b725a4b521e969f38e74f8af6c2ebc8d419ccaf65a1a8a1d6426cc0cb7998f19776b72805831d809e9d7cd63c5a1168911593fed55d8aa61dacedb8c44e9736e0b84bfb56f3db9c8905f5bec8669ba7a45aa26be105f1544434a61a7c53bb0fb51549212e317c75a44030dccbe504fc57e1934e506c8ab25dcc942a897b1c19b3d8f24cb83c939f0bffbae5425200f9e4039cf1895bd89d54f04464ded36fc087007fb62a95324dd67a9546f54e8599b8d216e15b01dddadc71dd4483527eae51a5445af03b021352f
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 0000000000000000000000000000000192c4f384457b19e31c151deab3b25ac79c5671847b5bcadc61f51491e574bac3f9286f7c9ba3148cecb1ff2c0317d010c71b82fa134c0806ee4172a63f7a291f0bfe579e397dcb80ebf4c830aabefc81d5cf8e0efc863d3495a6577af9b19d40b3ae3df915e27fb721063f638b0a3810316b0402c363772deb7989d419263ddecb7e6cf3003b184802684031931d8098aed0df642a91e6e0a9974a52315d4079d164731d87e14eb0248d16256e45466f70a66db3cec816eb9e919f2e0cb988709d801cd8b2c2d21fb72d10cd8872d1583913da0a8b9a7297a2127cdead7375b8dc59e3f417dbde2dceb59beff4736318063a81dedef6afc6aee4c5a6499616db
m (little endian): 6a350ca9eaa894f9287cce83c2df84854e2fec40059fa32e9e34bdf6375104ec2004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420ec045137f6bd349e2ea39f0540ec2f4e8584dfc283ce7c28f994a8eaa90c356a
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420ec045137f6bd349e2ea39f0540ec2f4e8584dfc283ce7c28f994a8eaa90c356a
DARLING CRYPTO STUB: ccec_const_cp_t ccec_cp_256()
curl(73,0x7ffff5665380) malloc: *** mach_vm_map(size=3377696525025280) failed (error code=5)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
curl(73,0x7ffff5665380) malloc: *** error for object 0x7fffffdfe190: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6 (core dumped)
Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl -k https://www.example.com  
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 21000000000000000000000000000060f09a39f5ff7f0000f954cb6577db78042b69ee2d6421fcdce2e53f150e682debb1c4e18feb0ec9a764f8056dc385eddbc953536b66a5a0f510c17c3fc54c2882376c6dd489cb20ba1eb175ab5005d19dfcaaf87e87cce805d3db3f9c7b42497a17639f59019260726aa03aa1116e33581928dd71bd822e7f83d7e5ccee45a2f71a92d3f4480b8df0f2ac4649247b348f9d416390061171b7608f1fb3dfc96d74449cf0f621f79f42b91374fb22c7346585c2090f773e0ed3dd8f454c9dac60fe1220aa11855c33456b18458ef23a60a4ebedaa275e537bd1756a504d8e27d77531769207b01542159271a5cf0cacd5dba72b29a08f668c3ad04a5d5a12196508722096a07412f0d00000000000000000d318367d0aef62d24d70ba1e791e78ef714d3fe4ee5f6e5eb1843cc3ecd6735ef84fb1060508ec50c07a2f9e7cb2f2ae989a66ccdb75091c149860dcf7e62902ac62d3da6796a824a9c0453098f4862152c11eaf44cc388ce6d34d01dab8d62247165df89192fe4ce10d9591827a2f5c9ffc1d8dc0c54f874bc177ffc40abc1ba1a93e30f80de5c98339d6473627abc49e2b3f261e04f1d3d0d60eab0c28bf92797bf55378b1a7e6877c2318918fadcc369182fac33e66018cc4b9e7fd04a402512d06130beb186e50fd6fcb9d8e54b0287bc1e433e8cb0eaa0a540cb3d1bb90eb97c44b2e79cc3041df30f1e8fc1a7865a8e4a9bad7bea3b6c040773faaa93901000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: d164de48a3bd390e8267d7c33b662f0712c871c61ff15dca6969ddc60755afa7
sig_len: 256
sig (big endian): 7bf88fe3c3c9904fb5a1643ac6d85ecf60d12eedaafa0b571c2255a452871bc92153df21d9bea32046c1f515e3916c69ee370d6ff5fb9b8e0958dc92748f0b82416e9453f6f1350681f43d0fe8c9ed50535785011b690436a9e1ce49189a184a63032f5343e7fa125048fd3c8d09f18d29acbaaf0b29257ea59bf1a8c0602fbc7223c824706413c4b1783a4c688a9467e165b6e6f7697538906f601cacdb840fb3723b962343ec92301f659f4644436a921c7014d1ae3745b2e020f289c541e44ad0b44f4dc05d86826092ac3b3bce1d096f923431f9abde637c9f0a48d0fe01d1accbbd1a4e951142780e3796eacc161cac95cf519d957d798cbbede91269e3
n of mod: 33
mod_len: 256
mod (little endian): f954cb6577db78042b69ee2d6421fcdce2e53f150e682debb1c4e18feb0ec9a764f8056dc385eddbc953536b66a5a0f510c17c3fc54c2882376c6dd489cb20ba1eb175ab5005d19dfcaaf87e87cce805d3db3f9c7b42497a17639f59019260726aa03aa1116e33581928dd71bd822e7f83d7e5ccee45a2f71a92d3f4480b8df0f2ac4649247b348f9d416390061171b7608f1fb3dfc96d74449cf0f621f79f42b91374fb22c7346585c2090f773e0ed3dd8f454c9dac60fe1220aa11855c33456b18458ef23a60a4ebedaa275e537bd1756a504d8e27d77531769207b01542159271a5cf0cacd5dba72b29a08f668c3ad04a5d5a12196508722096a07412f0d00000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): d318367d0aef62d24d70ba1e791e78ef714d3fe4ee5f6e5eb1843cc3ecd6735ef84fb1060508ec50c07a2f9e7cb2f2ae989a66ccdb75091c149860dcf7e62902ac62d3da6796a824a9c0453098f4862152c11eaf44cc388ce6d34d01dab8d62247165df89192fe4ce10d9591827a2f5c9ffc1d8dc0c54f874bc177ffc40abc1ba1a93e30f80de5c98339d6473627abc49e2b3f261e04f1d3d0d60eab0c28bf92797bf55378b1a7e6877c2318918fadcc369182fac33e66018cc4b9e7fd04a402512d06130beb186e50fd6fcb9d8e54b0287bc1e433e8cb0eaa0a540cb3d1bb90eb97c44b2e79cc3041df30f1e8fc1a7865a8e4a9bad7bea3b6c040773faaa93901000000000000000000000000000000
mod (big endian): 0000000000000000d0f01274a0962072086519125a5d4ad03a8c668fa0292ba7dbd5ac0ccfa57192154215b00792763175d7278e4d506a75d17b535e27aaedeba4603af28e45186b45335c8511aa2012fe60ac9d4c458fddd30e3e770f09c2856534c722fb7413b9429ff721f6f09c44746dc9dfb31f8f60b77111069063419d8f347b244946acf2f08d0b48f4d3921af7a245eecce5d7837f2e82bd71dd281958336e11a13aa06a72609201599f63177a49427b9c3fdbd305e8cc877ef8aafc9dd10550ab75b11eba20cb89d46d6c3782284cc53f7cc110f5a0a5666b5353c9dbed85c36d05f864a7c90eeb8fe1c4b1eb2d680e153fe5e2dcfc21642dee692b0478db7765cb54f9
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 0000000000000000000000000000000139a9aa3f7740c0b6a3bed7baa9e4a865781afce8f130df4130cc792e4bc497eb90bbd1b30c540aaa0ecbe833e4c17b28b0548e9dcb6ffd506e18eb0b13062d5102a404fde7b9c48c01663ec3fa829136ccad8f9118237c87e6a7b17853f57b7992bf280cab0ed6d0d3f1041e263f2b9ec4ab273647d63983c9e50df8303ea9a11bbc0ac4ff77c14b874fc5c08d1dfc9f5c2f7a8291950de14cfe9291f85d164722d6b8da014dd3e68c38cc44af1ec1522186f4983045c0a924a89667dad362ac0229e6f7dc6098141c0975dbcc669a98aef2b27c9e2f7ac050ec080506b14ff85e73d6ecc33c84b15e6e5feee43f4d71ef781e791eba704dd262ef0a7d3618d3
m (little endian): a7af5507c6dd6969ca5df11fc671c812072f663bc3d767820e39bda348de64d12004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420d164de48a3bd390e8267d7c33b662f0712c871c61ff15dca6969ddc60755afa7
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420d164de48a3bd390e8267d7c33b662f0712c871c61ff15dca6969ddc60755afa7
DARLING CRYPTO STUB: ccec_const_cp_t ccec_cp_256()
curl(76,0x7ffff5665380) malloc: *** mach_vm_map(size=3377696525025280) failed (error code=5)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
curl(76,0x7ffff5665380) malloc: *** error for object 0x7fffffdfe190: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6 (core dumped)
Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl -k https://www.microsoft.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 210000000000000000000000000000e0f09a39f5ff7f00004f308ad6581143047c06a65c8991f2a0852068921b9b412fd62177ec96e78116679594a3bb7d465c5726b9b2c2f046358f1d9dc9c0e0d06eb250f161b6ea7e86c21f318ad1236805867253e53fab6331ff130e0e79fa917d4ee97a5757dfb981ed6911d8dd2a4eeeee63e983a81f75c480127c688607b6512ed22f61753834049dc39bf381f1644a886f2edfc6f8073afb55f86c218e0013bb2445961d3d431ec5d1b4f8ae9da6772f4387af40cc55025ea44838ecddb1681c62a0a7fcd92442b1a9b7f3b38b2d6eeeb114c627b9f9548d84ccee61ed3e56cdddb5dfa95cff0d2bbb1d724183651a06b49021d7d0fbef6ca73ac3fb6f0eb1021d4ccd42ad10d3000000000000000031c5e167140de80305c46ad4266f0db508ea0a135298e7bd440ff1e4a4af6483e4d4dbde2c324f2abb4948952299269a4e47224258957ab818a6c1cad67577de1df35bf2611a796b04848a736cd5a8569d6804118691e8331b07b142c34df00324b7d67b0d4fb0f35becb1fb8e6289725cace95cfe5ac59905eea037f6403d2a682709ac026dc1510c85e69dafa62f7b1d740bf72edb2a16c3f6377f6084f6ef53ab41eb850969e3065cfd1081b9b96de43415c3f7fca176ef0241bd1fcd4fce4b151cba76ae38dba38d3925321ecbbda5c321b6af082e6af0233f3a7217710e84aa695d9d0f40f9daf9c62d4680767a1b4cff24124e82dc99551694b954803601000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: f89c0291408ac08242587fc60b6c726ad0fba371b4f5e20785083db55811e0d2
sig_len: 256
sig (big endian): 1a959d83687709d233213fbb0ed3c347383fd90c291336d5dc0887234f4a86913b598b47f5df62a8684e6c15df9d4096f37a7e823738e16ab4ad5845309865630309fe9c5fe12c3f3d44128c9d1870b8eec1ac694a539fe2a2c59ab47d0494c490b9a67a7fa139930bf467630c1832a8abca91171e9ce016f934bfd12d41ed670512a3c9541a8bb6fadc277ce31b9d8429c329f1499be743050af3f0780d9427f0fdde9cc12512d6d3bd26ba59421055f17d18be1f7411e0cf83c21ba77b27b5155a2411c92527934155c82766b516c6a18ef167bf9555460e6530fd2933bf6ba95bb98c929028d80d143637d588d8afeece3739f55af5fd01d874ba1566603d
n of mod: 33
mod_len: 256
mod (little endian): 4f308ad6581143047c06a65c8991f2a0852068921b9b412fd62177ec96e78116679594a3bb7d465c5726b9b2c2f046358f1d9dc9c0e0d06eb250f161b6ea7e86c21f318ad1236805867253e53fab6331ff130e0e79fa917d4ee97a5757dfb981ed6911d8dd2a4eeeee63e983a81f75c480127c688607b6512ed22f61753834049dc39bf381f1644a886f2edfc6f8073afb55f86c218e0013bb2445961d3d431ec5d1b4f8ae9da6772f4387af40cc55025ea44838ecddb1681c62a0a7fcd92442b1a9b7f3b38b2d6eeeb114c627b9f9548d84ccee61ed3e56cdddb5dfa95cff0d2bbb1d724183651a06b49021d7d0fbef6ca73ac3fb6f0eb1021d4ccd42ad10d30000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): 31c5e167140de80305c46ad4266f0db508ea0a135298e7bd440ff1e4a4af6483e4d4dbde2c324f2abb4948952299269a4e47224258957ab818a6c1cad67577de1df35bf2611a796b04848a736cd5a8569d6804118691e8331b07b142c34df00324b7d67b0d4fb0f35becb1fb8e6289725cace95cfe5ac59905eea037f6403d2a682709ac026dc1510c85e69dafa62f7b1d740bf72edb2a16c3f6377f6084f6ef53ab41eb850969e3065cfd1081b9b96de43415c3f7fca176ef0241bd1fcd4fce4b151cba76ae38dba38d3925321ecbbda5c321b6af082e6af0233f3a7217710e84aa695d9d0f40f9daf9c62d4680767a1b4cff24124e82dc99551694b954803601000000000000000000000000000000
mod (big endian): 0000000000000000d310ad42cd4c1d02b10e6ffbc33aa76ceffbd0d72190b4061a658341721dbb2b0dff5ca9dfb5ddcd563eed61eecc848d54f9b927c614b1ee6e2d8bb3f3b7a9b14224d9fca7a0621c68b1ddec3848a45e0255cc40af87432f77a69daef8b4d1c51e433d1d964524bb13008e216cf855fb3a07f8c6df2e6f884a64f181f39bc39d04343875612fd22e51b60786687c1280c4751fa883e963eeee4e2addd81169ed81b9df57577ae94e7d91fa790e0e13ff3163ab3fe5537286056823d18a311fc2867eeab661f150b26ed0e0c0c99d1d8f3546f0c2b2b926575c467dbba39495671681e796ec7721d62f419b1b92682085a0f291895ca6067c04431158d68a304f
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 00000000000000000000000000000001368054b994165599dc824e1224ff4c1b7a7680462dc6f9daf9400f9d5d69aa840e7117723a3f23f06a2e08afb621c3a5bdcb1e3225398da3db38ae76ba1c154bce4fcd1fbd4102ef76a1fcf7c31534e46db9b98110fd5c06e3690985eb41ab53eff684607f37f6c3162adb2ef70b741d7b2fa6af9de6850c51c16d02ac0927682a3d40f637a0ee0599c55afe5ce9ac5c7289628efbb1ec5bf3b04f0d7bd6b72403f04dc342b1071b33e891861104689d56a8d56c738a84046b791a61f25bf31dde7775d6cac1a618b87a95584222474e9a269922954849bb2a4f322cdedbd4e48364afa4e4f10f44bde79852130aea08b50d6f26d46ac40503e80d1467e1c531
m (little endian): d2e01158b53d088507e2f5b471a3fbd06a726c0bc67f584282c08a4091029cf82004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420f89c0291408ac08242587fc60b6c726ad0fba371b4f5e20785083db55811e0d2
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420f89c0291408ac08242587fc60b6c726ad0fba371b4f5e20785083db55811e0d2
DARLING CRYPTO STUB: ccec_const_cp_t ccec_cp_256()
curl(80,0x7ffff5665380) malloc: *** mach_vm_map(size=3377696525025280) failed (error code=5)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
curl(80,0x7ffff5665380) malloc: *** error for object 0x7fffffdfd190: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6 (core dumped)

Seems like next up is Elliptic Curve cryptography!

facekapow commented 4 years ago

🎉 With my latest commit in darlinghq/darling-corecrypto#6, HTTPS now works (for some websites)!

https://www.example.com

Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl -k https://www.example.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 210000000000000000000000000000e020c639f5ff7f0000f954cb6577db78042b69ee2d6421fcdce2e53f150e682debb1c4e18feb0ec9a764f8056dc385eddbc953536b66a5a0f510c17c3fc54c2882376c6dd489cb20ba1eb175ab5005d19dfcaaf87e87cce805d3db3f9c7b42497a17639f59019260726aa03aa1116e33581928dd71bd822e7f83d7e5ccee45a2f71a92d3f4480b8df0f2ac4649247b348f9d416390061171b7608f1fb3dfc96d74449cf0f621f79f42b91374fb22c7346585c2090f773e0ed3dd8f454c9dac60fe1220aa11855c33456b18458ef23a60a4ebedaa275e537bd1756a504d8e27d77531769207b01542159271a5cf0cacd5dba72b29a08f668c3ad04a5d5a12196508722096a07412f0d00000000000000000d318367d0aef62d24d70ba1e791e78ef714d3fe4ee5f6e5eb1843cc3ecd6735ef84fb1060508ec50c07a2f9e7cb2f2ae989a66ccdb75091c149860dcf7e62902ac62d3da6796a824a9c0453098f4862152c11eaf44cc388ce6d34d01dab8d62247165df89192fe4ce10d9591827a2f5c9ffc1d8dc0c54f874bc177ffc40abc1ba1a93e30f80de5c98339d6473627abc49e2b3f261e04f1d3d0d60eab0c28bf92797bf55378b1a7e6877c2318918fadcc369182fac33e66018cc4b9e7fd04a402512d06130beb186e50fd6fcb9d8e54b0287bc1e433e8cb0eaa0a540cb3d1bb90eb97c44b2e79cc3041df30f1e8fc1a7865a8e4a9bad7bea3b6c040773faaa93901000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: 09f17dc8b0877f26c30bd9e1d4dafca53724eb1385507df140a73000a63e6946
sig_len: 256
sig (big endian): 2cc6ddad06382544dfb076a8d322fc911a9b055a0ab3e40757f1c792226d4e2f6b400c093259d095d65f178cfd7ff1bf3fcab02d9ec7fa3fbf21b5399b77a824be0fcffa09714978181e08e13d044e3e75992e627483594c7c2cc2af54224cada868a8fe16d7305ea570b35988d57fb8a4a2fd6d7ff2993dd6020e67bd30d99d79435d17174a3563c756cd7993b806fe5dfc918ed86bf1f0dad746a1136510224dbd4d08aea722d26a853673a43eed756cbd656c32f0d1a77292b1bcd60d6f9bf45a1f3f095ee5ecd663d6075a9bd16fb1a4d7d6efb8dae71e5813643ba2cbb70fe4f8e3af45c5f892fb2139e97dbf93f0a5bc070423e4dd79fce972b5d0346d
n of mod: 33
mod_len: 256
mod (little endian): f954cb6577db78042b69ee2d6421fcdce2e53f150e682debb1c4e18feb0ec9a764f8056dc385eddbc953536b66a5a0f510c17c3fc54c2882376c6dd489cb20ba1eb175ab5005d19dfcaaf87e87cce805d3db3f9c7b42497a17639f59019260726aa03aa1116e33581928dd71bd822e7f83d7e5ccee45a2f71a92d3f4480b8df0f2ac4649247b348f9d416390061171b7608f1fb3dfc96d74449cf0f621f79f42b91374fb22c7346585c2090f773e0ed3dd8f454c9dac60fe1220aa11855c33456b18458ef23a60a4ebedaa275e537bd1756a504d8e27d77531769207b01542159271a5cf0cacd5dba72b29a08f668c3ad04a5d5a12196508722096a07412f0d00000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): d318367d0aef62d24d70ba1e791e78ef714d3fe4ee5f6e5eb1843cc3ecd6735ef84fb1060508ec50c07a2f9e7cb2f2ae989a66ccdb75091c149860dcf7e62902ac62d3da6796a824a9c0453098f4862152c11eaf44cc388ce6d34d01dab8d62247165df89192fe4ce10d9591827a2f5c9ffc1d8dc0c54f874bc177ffc40abc1ba1a93e30f80de5c98339d6473627abc49e2b3f261e04f1d3d0d60eab0c28bf92797bf55378b1a7e6877c2318918fadcc369182fac33e66018cc4b9e7fd04a402512d06130beb186e50fd6fcb9d8e54b0287bc1e433e8cb0eaa0a540cb3d1bb90eb97c44b2e79cc3041df30f1e8fc1a7865a8e4a9bad7bea3b6c040773faaa93901000000000000000000000000000000
mod (big endian): 0000000000000000d0f01274a0962072086519125a5d4ad03a8c668fa0292ba7dbd5ac0ccfa57192154215b00792763175d7278e4d506a75d17b535e27aaedeba4603af28e45186b45335c8511aa2012fe60ac9d4c458fddd30e3e770f09c2856534c722fb7413b9429ff721f6f09c44746dc9dfb31f8f60b77111069063419d8f347b244946acf2f08d0b48f4d3921af7a245eecce5d7837f2e82bd71dd281958336e11a13aa06a72609201599f63177a49427b9c3fdbd305e8cc877ef8aafc9dd10550ab75b11eba20cb89d46d6c3782284cc53f7cc110f5a0a5666b5353c9dbed85c36d05f864a7c90eeb8fe1c4b1eb2d680e153fe5e2dcfc21642dee692b0478db7765cb54f9
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 0000000000000000000000000000000139a9aa3f7740c0b6a3bed7baa9e4a865781afce8f130df4130cc792e4bc497eb90bbd1b30c540aaa0ecbe833e4c17b28b0548e9dcb6ffd506e18eb0b13062d5102a404fde7b9c48c01663ec3fa829136ccad8f9118237c87e6a7b17853f57b7992bf280cab0ed6d0d3f1041e263f2b9ec4ab273647d63983c9e50df8303ea9a11bbc0ac4ff77c14b874fc5c08d1dfc9f5c2f7a8291950de14cfe9291f85d164722d6b8da014dd3e68c38cc44af1ec1522186f4983045c0a924a89667dad362ac0229e6f7dc6098141c0975dbcc669a98aef2b27c9e2f7ac050ec080506b14ff85e73d6ecc33c84b15e6e5feee43f4d71ef781e791eba704dd262ef0a7d3618d3
m (little endian): 46693ea60030a740f17d508513eb2437a5fcdad4e1d90bc3267f87b0c87df1092004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d06096086480165030402010500042009f17dc8b0877f26c30bd9e1d4dafca53724eb1385507df140a73000a63e6946
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d06096086480165030402010500042009f17dc8b0877f26c30bd9e1d4dafca53724eb1385507df140a73000a63e6946
in_len: 65
in: 0410a8e43c91eb034806c633d2d51b4d2ad7020b1209503c1d03034080cad4b05459f1551602645c5ac1e47160269793efda878c2f5c6a4d283a5db8eef718ad43
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
generated key: 60633bf5ff7f00001f374c93fc0700003281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
  x: 68ba1f7a5d0bf233d2bc4993c360526212ee137598513adbd30da68840468132
  y: ed41ba66b3c2adbc5701017b1950e1686648649276a9481ca0a479c1c5ea3d95
  z: 0000000000000000000000000000000000000000000000000000000000000001
  k: f6e190614fcd4621dc96afb3da3ea63db115f6d946db03400eb2ea7f960db6bb
private_key: 60633bf5ff7f00001f374c93fc0700003281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
public key: 60633bf5ff7f000034314c93fc07002054b0d4ca804003031d3c5009120b02d72a4d1bd5d233c6064803eb913ce4a81043ad18f7eeb85d3a284d6a5c2f8c87daef9397266071e4c15a5c64021655f1590100000000000000000000000000000000000000000000000000000000000000
provided buffer length: 65
computed_shared_secret: 36cb4fbeaf725d6f2e6596d6fafdf3dfe5b1ec18a5867b8dc342f80d9f806e6f
<!doctype html>
<html>
<head>
    <title>Example Domain</title>

    <meta charset="utf-8" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <style type="text/css">
    body {
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

    }
    div {
        width: 600px;
        margin: 5em auto;
        padding: 2em;
        background-color: #fdfdff;
        border-radius: 0.5em;
        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
    }
    a:link, a:visited {
        color: #38488f;
        text-decoration: none;
    }
    @media (max-width: 700px) {
        div {
            margin: 0 auto;
            width: auto;
        }
    }
    </style>    
</head>

<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is for use in illustrative examples in documents. You may use this
    domain in literature without prior coordination or asking for permission.</p>
    <p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>

https://www.google.com

Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl -k https://www.google.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 210000000000000000000000000000e020c639f5ff7f00001546c5bc60d49137fd68457c67a5830e6452147ddcddf8e519b52f9e2915e522d643253ed39209d54c5ed41447581d58591b263b93e681215dc409c9ef4e3dd3f43830c842e2e6b9b3a075f5c301086069ff18404efb47154fea5297cb4dc12814bf39aaa31adfc1601a8c62415da84c530dc4e626677b36ecfb50c23b34fc1c5340f8a600bac03d7345b8c72db302c9fbab71689a40b15eaaaa0b0531d9306543913f5cbf2c09f681861ae0393ac7ce68bc9fc564bfa47f05e506048b26c34aa37380d7f90cfd722db6353bb3ff72c8035efb754d6a22a1cbbf0b61536c09ecbf5209673e6ded0f5fa2ab8152d8f2eb9ffd3b8854e20fbd70eb0e537a0506eb000000000000000046b7c493f95ec1ede8f5813f92f4134b927937d6b7ab51bf19f38105e2dddb8e6e53a20428794071cb6b2ee4fc2847acd85fc6209593364764659110b1b8dd21e67d30834a826e683e10c6368bdfb97a51a3a0ea32fe9a92d152fa2ffa329f4e2b357c89c4b25ae97ad91007923c36ca74f4216de32952bfa0ea3f12d985a8b14bcdc196ec9a38cec399257af2643453408b49dc1d148605737396e5ec82ef9f4213663568d0221e70a6bf8fac3e8d3c09479837f822afcf748b996a668e8aa15e07a62edde84875d1b56231868f03a59640516700e4c07cc52ce83412a8ffe3ffba7190db45a6e3e546028eaa49d4f75d3d184547387391a8bb74ef7943d91601000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: 2257dd55b914d97162c9d5854cd534e0fdc3a310e247a3ae6eebe65d0d9db5ea
sig_len: 256
sig (big endian): 4f4209dd098835299d0b5b8119750da9c5dac03f822d5f9091fe79558c839183adbdd3e1a87a400432210d8a7568795d6de56ced14644fa9cb16800d0e74cbf6f7af759bc8071e1aeeac3b5cf0a0db46084da7f637f7650f71ecb814aa00ec35642ba55dce00adf05b42df60701fb5cf2ba8ed37c1727a65b010dbd800d0ab7442b0f69d1355f99508675f9c2fa1a647b2924c9b4b8922b4bb4c0d2fe18ff453669501719ecd20e2dde80c758aa01228d4baf47a845cde13221bfc1de5abc69cad29cc9e6961f6d8e54ec7f2cc425970ea7f3654854f1db34423337bde3d0311b2b7d4ae8bcd5097039b46802198ecd46ece0196555cb759695a88fb7a1ecaaa
n of mod: 33
mod_len: 256
mod (little endian): 1546c5bc60d49137fd68457c67a5830e6452147ddcddf8e519b52f9e2915e522d643253ed39209d54c5ed41447581d58591b263b93e681215dc409c9ef4e3dd3f43830c842e2e6b9b3a075f5c301086069ff18404efb47154fea5297cb4dc12814bf39aaa31adfc1601a8c62415da84c530dc4e626677b36ecfb50c23b34fc1c5340f8a600bac03d7345b8c72db302c9fbab71689a40b15eaaaa0b0531d9306543913f5cbf2c09f681861ae0393ac7ce68bc9fc564bfa47f05e506048b26c34aa37380d7f90cfd722db6353bb3ff72c8035efb754d6a22a1cbbf0b61536c09ecbf5209673e6ded0f5fa2ab8152d8f2eb9ffd3b8854e20fbd70eb0e537a0506eb0000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): 46b7c493f95ec1ede8f5813f92f4134b927937d6b7ab51bf19f38105e2dddb8e6e53a20428794071cb6b2ee4fc2847acd85fc6209593364764659110b1b8dd21e67d30834a826e683e10c6368bdfb97a51a3a0ea32fe9a92d152fa2ffa329f4e2b357c89c4b25ae97ad91007923c36ca74f4216de32952bfa0ea3f12d985a8b14bcdc196ec9a38cec399257af2643453408b49dc1d148605737396e5ec82ef9f4213663568d0221e70a6bf8fac3e8d3c09479837f822afcf748b996a668e8aa15e07a62edde84875d1b56231868f03a59640516700e4c07cc52ce83412a8ffe3ffba7190db45a6e3e546028eaa49d4f75d3d184547387391a8bb74ef7943d91601000000000000000000000000000000
mod (big endian): 0000000000000000eb06057a530eeb70bd0fe254883bfd9febf2d85281aba25f0fed6d3e670952bfec096c53610bbfcba1226a4d75fb5e03c872ffb33b35b62d72fd0cf9d78073a34ac3268b0406e5057fa4bf64c59fbc68cec73a39e01a8681f6092cbf5c3f91436530d931050baaaa5eb1409a6871abfbc902b32dc7b845733dc0ba00a6f840531cfc343bc250fbec367b6726e6c40d534ca85d41628c1a60c1df1aa3aa39bf1428c14dcb9752ea4f1547fb4e4018ff69600801c3f575a0b3b9e6e242c83038f4d33d4eefc909c45d2181e6933b261b59581d584714d45e4cd50992d33e2543d622e515299e2fb519e5f8dddc7d1452640e83a5677c4568fd3791d460bcc54615
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 0000000000000000000000000000000116d94379ef74bba89173384745183d5df7d449aa8e0246e5e3a645db9071baffe3ffa81234e82cc57cc0e40067514096a5038f863162b5d17548e8dd2ea6075ea18a8e666a998b74cfaf22f8379847093c8d3eac8fbfa6701e22d068356613429fef82ece59673730586141ddc498b40533464f27a2599c3ce389aec96c1cd4bb1a885d9123feaa0bf5229e36d21f474ca363c920710d97ae95ab2c4897c352b4e9f32fa2ffa52d1929afe32eaa0a3517ab9df8b36c6103e686e824a83307de621ddb8b1109165644736939520c65fd8ac4728fce42e6bcb7140792804a2536e8edbdde20581f319bf51abb7d63779924b13f4923f81f5e8edc15ef993c4b746
m (little endian): eab59d0d5de6eb6eaea347e210a3c3fde034d54c85d5c96271d914b955dd57222004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004202257dd55b914d97162c9d5854cd534e0fdc3a310e247a3ae6eebe65d0d9db5ea
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004202257dd55b914d97162c9d5854cd534e0fdc3a310e247a3ae6eebe65d0d9db5ea
in_len: 65
in: 044312e4b10bd922968f2aa49e6bf1ad4869a04e32283edd5fa78ee9d84da1f319ecdc1407144fc445ad7a0ef2477bb9ffb9a3b13d13b6698ef7f00f0c98a149b8
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
generated key: 60633bf5ff7f000000000000000000e03281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
  x: 68ba1f7a5d0bf233d2bc4993c360526212ee137598513adbd30da68840468132
  y: ed41ba66b3c2adbc5701017b1950e1686648649276a9481ca0a479c1c5ea3d95
  z: 0000000000000000000000000000000000000000000000000000000000000001
  k: f6e190614fcd4621dc96afb3da3ea63db115f6d946db03400eb2ea7f960db6bb
private_key: 60633bf5ff7f000000000000000000e03281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
public key: 60633bf5ff7f0000073164ddf907003019f3a14dd8e98ea75fdd3e28324ea06948adf16b9ea42a8f9622d90bb1e41243b849a1980c0ff0f78e69b6133db1a3b9ffb97b47f20e7aad45c44f140714dcec0100000000000000000000000000000000000000000000000000000000000000
provided buffer length: 65
computed_shared_secret: e33545548b79e81bd8cd483fcbfbb5e1e409c8cf095df1934f806d110fb9333d00
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en"><head><meta content="Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for." name="description"><meta content="noodp" name="robots"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/logos/doodles/2020/stay-home-save-lives-6753651837108752-law.gif" itemprop="image"><meta content="Stay Home. Save Lives : Help Stop Coronavirus" property="twitter:title"><meta content="Stay Home. Save Lives : Help Stop Coronavirus #GoogleDoodle" property="twitter:description"><meta content="Stay Home. Save Lives : Help Stop Coronavirus #GoogleDoodle" property="og:description"><meta content="summary_large_image" property="twitter:card"><meta content="@GoogleDoodles" property="twitter:site"><meta content="https://www.google.com/logos/doodles/2020/stay-home-save-lives-6753651837108752.2-2xa.gif" property="twitter:image"><meta content="https://www.google.com/logos/doodles/2020/stay-home-save-lives-6753651837108752.2-2xa.gif" property="og:image"><meta content="1000" property="og:image:width"><meta content="400" property="og:image:height"><meta content="https://www.google.com/logos/doodles/2020/stay-home-save-lives-6753651837108752.2-2xa.gif" property="og:url"><meta content="video.other" property="og:type"><title>Google</title><script nonce="lmE8L9jt2PbqGRtLVYslPQ==">(function(){window.google={kEI:'wA2KXsWZKcGl_QaopqrACQ',kEXPI:'0,202123,3,1151620,5663,731,223,5105,206,3204,10,1051,175,364,1435,4,60,817,383,139,107,5,623,144,243,9,335,728,45,39,104,5,13,363,25,5,38,51,417960,708390,1197734,290,125,329118,1294,12383,4855,32691,15248,867,28684,364,8824,8384,4859,1361,9291,3020,4747,3118,7915,1497,311,4020,978,4788,1,3142,5297,2054,622,298,873,1217,2975,6430,1142,10164,2884,20,317,236,2937,1344,2778,520,399,2277,8,4389,1279,2212,202,39,289,149,1103,327,513,517,1466,8,50,156,662,3438,312,1135,1,3,2063,606,1839,184,1920,377,1947,747,283,1,1198,93,328,1284,16,447,2480,2246,474,1339,29,719,1039,3227,2845,7,437,5162,2034,6513,2662,642,2450,2458,1226,496,966,3934,1275,108,3407,908,2,940,2615,2132,265,2894,2525,226,995,830,1,228,10,601,480,606,917,432,3,346,200,187,813,183,562,120,1,371,1497,143,1906,440,267,148,189,3312,503,1,1986,27,130,1,70,247,911,591,273,1992,415,49,143,1391,1744,4,499,838,191,17,125,179,13,227,83,298,69,4,280,2,292,86,629,154,180,483,209,188,22,869,276,326,69,2,8,41,64,437,313,315,5,84,328,140,133,359,227,133,540,498,338,164,21,29,290,106,225,29,13,239,55,119,16,206,234,124,89,130,127,4,6,893,5830611,1805894,4194806,2799892,1324,882,444,1,2,31,49,1,900,896,1,8,1,2,2551,1,748,141,795,10,553,1,4265,1,1,1,1,137,1,1193,722,450,217,12,3,3,1,1,2,3,1,1,1,1,1,1,1,13,2,2,2,1,1,1,2,11,4,1,1,1,5,3,2,3,7,2,1,1,1,1,4,1,4,1,5,1,3,23962895,24',kBL:'-KLY'};google.sn='webhp';google.kHL='en';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var c;a&&(!a.getAttribute||!(c=a.getAttribute("eid")));)a=a.parentNode;return c||google.kEI};google.getLEI=function(a){for(var c=null;a&&(!a.getAttribute||!(c=a.getAttribute("leid")));)a=a.parentNode;return c};google.ml=function(){return null};google.time=function(){return Date.now()};google.log=function(a,c,b,d,g){if(b=google.logUrl(a,c,b,d,g)){a=new Image;var e=google.lc,f=google.li;e[f]=a;a.onerror=a.onload=a.onabort=function(){delete e[f]};google.vel&&google.vel.lu&&google.vel.lu(b);a.src=b;google.li=f+1}};google.logUrl=function(a,c,b,d,g){var e="",f=google.ls||"";b||-1!=c.search("&ei=")||(e="&ei="+google.getEI(d),-1==c.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));d="";!b&&google.cshid&&-1==c.search("&cshid=")&&"slh"!=a&&(d="&cshid="+google.cshid);b=b||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+c+e+f+"&zx="+google.time()+d;/^http:/i.test(b)&&"https:"==window.location.protocol&&(google.ml(Error("a"),!1,{src:b,glmm:1}),b="");return b};}).call(this);(function(){google.y={};google.x=function(a,b){if(a)var c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);google.f={};(function(){
document.documentElement.addEventListener("submit",function(b){var a;if(a=b.target){var c=a.getAttribute("data-submitfalse");a="1"==c||"q"==c&&!a.elements.q.value?!0:!1}else a=!1;a&&(b.preventDefault(),b.stopPropagation())},!0);document.documentElement.addEventListener("click",function(b){var a;a:{for(a=b.target;a&&a!=document.documentElement;a=a.parentElement)if("A"==a.tagName){a="1"==a.getAttribute("data-nohref");break a}a=!1}a&&b.preventDefault()},!0);}).call(this);
var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#36c}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:#000}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}.ftl,#fll a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}</style><script nonce="lmE8L9jt2PbqGRtLVYslPQ=="></script></head><body bgcolor="#fff"><script nonce="lmE8L9jt2PbqGRtLVYslPQ==">(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><div id="mngb"> <div id=gbar><nobr><b class=gb1>Search</b> <a class=gb1 href="https://www.google.com/imghp?hl=en&tab=wi">Images</a> <a class=gb1 href="https://maps.google.com/maps?hl=en&tab=wl">Maps</a> <a class=gb1 href="https://play.google.com/?hl=en&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?gl=US&tab=w1">YouTube</a> <a class=gb1 href="https://news.google.com/nwshp?hl=en&tab=wn">News</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">Drive</a> <a class=gb1 style="text-decoration:none" href="https://www.google.com/intl/en/about/products?tab=wh"><u>More</u> &raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.com/history/optout?hl=en" class=gb4>Web History</a> | <a  href="/preferences?hl=en" class=gb4>Settings</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=en&passive=true&continue=https://www.google.com/" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div> </div><center><br clear="all" id="lgpd"><div id="lga"><a href="/search?ie=UTF-8&amp;q=coronavirus+tips&amp;oi=ddle&amp;ct=153021071&amp;hl=en&amp;sa=X&amp;ved=0ahUKEwjF-eTC4NHoAhXBUt8KHSiTCpgQPQgD"><img alt="Stay Home. Save Lives : Help Stop Coronavirus" border="0" height="200" src="/logos/doodles/2020/stay-home-save-lives-6753651837108752-law.gif" title="Stay Home. Save Lives : Help Stop Coronavirus" width="500" id="hplogo"><br></a><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%">&nbsp;</td><td align="center" nowrap=""><input name="ie" value="ISO-8859-1" type="hidden"><input value="en" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input class="lst" style="margin:0;padding:5px 8px 0 6px;vertical-align:top;color:#000" autocomplete="off" value="" title="Google Search" maxlength="2048" name="q" size="57"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google Search" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" id="tsuid1" value="I'm Feeling Lucky" name="btnI" type="submit"><script nonce="lmE8L9jt2PbqGRtLVYslPQ==">(function(){var id='tsuid1';document.getElementById(id).onclick = function(){if (this.form.q.value){this.checked = 1;if (this.form.iflsig)this.form.iflsig.disabled = false;}
else top.location='/doodles/';};})();</script><input value="AINFCbYAAAAAXoob0ALcz0VyGrTnB3xq4AiXpuJQBDd4" name="iflsig" type="hidden"></span></span></td><td class="fl sblc" align="left" nowrap="" width="25%"><a href="/advanced_search?hl=en&amp;authuser=0">Advanced search</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"><script nonce="lmE8L9jt2PbqGRtLVYslPQ==">(function(){var a,b="1";if(document&&document.getElementById)if("undefined"!=typeof XMLHttpRequest)b="2";else if("undefined"!=typeof ActiveXObject){var c,d,e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(c=0;d=e[c++];)try{new ActiveXObject(d),b="2"}catch(h){}}a=b;if("2"==a&&-1==location.search.indexOf("&gbv=2")){var f=google.gbvu,g=document.getElementById("gbv");g&&(g.value=a);f&&window.setTimeout(function(){location.href=f},0)};}).call(this);</script></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br><div id="prm"><style>.szppmdbYutt__middle-slot-promo{font-size:small;margin-bottom:32px}.szppmdbYutt__middle-slot-promo a.ZIeIlb{display:inline-block;text-decoration:none}.szppmdbYutt__middle-slot-promo img{border:none;margin-right:5px;vertical-align:middle}</style><div class="szppmdbYutt__middle-slot-promo" data-ved="0ahUKEwjF-eTC4NHoAhXBUt8KHSiTCpgQnIcBCAQ"><a class="NKcBbd" href="https://www.google.com/url?q=https://www.youtube.com/stayhome&amp;source=hpp&amp;id=19017116&amp;ct=3&amp;usg=AFQjCNEwgaxyEPprUrZDibm4nqSwUUbMtQ&amp;sa=X&amp;ved=0ahUKEwjF-eTC4NHoAhXBUt8KHSiTCpgQ8IcBCAU" rel="nofollow">Stay home. Save lives. Help stop coronavirus</a></div></div></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="fll"><a href="/intl/en/ads/">Advertising�Programs</a><a href="/services/">Business Solutions</a><a href="/intl/en/about.html">About Google</a></div></div><p style="font-size:8pt;color:#767676">&copy; 2020 - <a href="/intl/en/policies/privacy/">Privacy</a> - <a href="/intl/en/policies/terms/">Terms</a></p></span></center><script nonce="lmE8L9jt2PbqGRtLVYslPQ==">(function(){window.google.cdo={height:0,width:0};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b){var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();(function(){var u='/xjs/_/js/k\x3dxjs.hp.en_US.Fllq_gw3IoM.O/m\x3dsb_he,d/am\x3dAAMCbAQ/d\x3d1/rs\x3dACT90oGIzrhAXruAe_SSaO5vzp-FaKIDfA';
setTimeout(function(){var b=document;var a="SCRIPT";"application/xhtml+xml"===b.contentType&&(a=a.toLowerCase());a=b.createElement(a);a.src=u;google.timers&&google.timers.load&&google.tick&&google.tick("load","xjsls");document.body.appendChild(a)},0);})();(function(){window.google.xjsu='/xjs/_/js/k\x3dxjs.hp.en_US.Fllq_gw3IoM.O/m\x3dsb_he,d/am\x3dAAMCbAQ/d\x3d1/rs\x3dACT90oGIzrhAXruAe_SSaO5vzp-FaKIDfA';})();function _DumpException(e){throw e;}
function _F_installCss(c){}
(function(){google.spjs=false;google.snet=true;google.em=[];google.emw=false;google.pdt=0;})();(function(){var pmc='{\x22d\x22:{},\x22sb_he\x22:{\x22agen\x22:true,\x22cgen\x22:true,\x22client\x22:\x22heirloom-hp\x22,\x22dh\x22:true,\x22dhqt\x22:true,\x22ds\x22:\x22\x22,\x22ffql\x22:\x22en\x22,\x22fl\x22:true,\x22host\x22:\x22google.com\x22,\x22isbh\x22:28,\x22jsonp\x22:true,\x22msgs\x22:{\x22cibl\x22:\x22Clear Search\x22,\x22dym\x22:\x22Did you mean:\x22,\x22lcky\x22:\x22I\\u0026#39;m Feeling Lucky\x22,\x22lml\x22:\x22Learn more\x22,\x22oskt\x22:\x22Input tools\x22,\x22psrc\x22:\x22This search was removed from your \\u003Ca href\x3d\\\x22/history\\\x22\\u003EWeb History\\u003C/a\\u003E\x22,\x22psrl\x22:\x22Remove\x22,\x22sbit\x22:\x22Search by image\x22,\x22srch\x22:\x22Google Search\x22},\x22ovr\x22:{},\x22pq\x22:\x22\x22,\x22refpd\x22:true,\x22rfs\x22:[],\x22sbpl\x22:16,\x22sbpr\x22:16,\x22scd\x22:10,\x22stok\x22:\x22qhXQZLWS6Oz9EkgoLI27S418YfE\x22,\x22uhde\x22:false}}';google.pmc=JSON.parse(pmc);})();</script>        </body></html>

Some other websites like Apple, Microsoft, and GitHub still don't work. I'm going to investigate and work on getting them to work:

https://www.apple.com

Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl -k https://www.apple.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 2100000000000000000000000000000020c639f5ff7f00002f3521b003af45541ae5ea273548d41dc7addd1db0156e218d9b59e8546f54a967dd2453a962fb077008fc36ed4d46044fd589bd9518cf39409e0f202554aefbbff039c983cb248f3d9bc1b197a842c9dc25abc806e534197ec54f50becc0d03445ac717e312925451fbb03bc5a7614a4344155f10be26aa457aba6986ec5b5f90c8b93d6fb5bf840b6e73e9448cdbceda61aad855ed3f59118916a1c563cdd7e909d8315880726b77198f99b70ccc26641d8a1a5af6ca9c418dbc2e6caff8748ef369e921b5a425b7e3441cd13074fe8b1e4541bcabb356b2c8b8d4a5105fbabd5a70ca77bb9e4de3e736dfc60739a80e4e2c99ec282998e773325673a6b6a20000000000000000db169649a6c5e4aec6aff6dede813a06186373f4ef9bb5ce2ddedb17f4e359dcb87573adde7c12a297729a8b0ada133958d17288cd102db71fd2c2b2d81c809d7088b90c2e9f919eeb16c8ceb36da6706f46456e25168d24b04ee1871d7364d179405d31524a97a9e0e6912a64dfd0ae98801d933140680248183b00f36c7ecbde3d2619d48979eb2d7763c302046b3110380a8b633f0621b77fe215f93daeb3409db1f97a57a695343d86fc0e8ecfd581fcbeaa30c8f4eb80cb7d399e57fe0b1f297a3fa67241ee06084c13fa821bc710d017032cffb1ec8c14a39b7c6f28f9c3ba74e59114f561dcca5b7b8471569cc75ab2b3ea1d151ce3197b4584f3c49201000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: 8538493647bc5c782bf436681403a97cf3883674a7c9376837b601450213b180
sig_len: 256
sig (big endian): 532eb801088ef39a22c0330d62a5ce71cca3ead501c9f5433c82d632a76bc33c74ff916e00f60f271a6eb2d6a035e17ed6b3083e00c06e364ea7941b0909031be213e00acf82b96b2ff40a25ea782fee39fb962698a2edf08593132bf5a17ca82c2f50ae5f37fd9ab8e181625060d922d5f866dfd0d9f6c832b3c27722f65599dfb0c41356a491b998903dbd372d742aa5ee204e8afa46a882fd25577e727121fc583ffde6f5134cb4ed460ccce21aec02981623c5afeecfffad70a8e5b434e47dc8e02d89859259da47c29dc0edd66dcec6ac50815df13c089109988e3274af1ab683e62fb0c6f6c5062dde9cc7cdae729e95b08e111726fe1c351edcf6aec0
n of mod: 33
mod_len: 256
mod (little endian): 2f3521b003af45541ae5ea273548d41dc7addd1db0156e218d9b59e8546f54a967dd2453a962fb077008fc36ed4d46044fd589bd9518cf39409e0f202554aefbbff039c983cb248f3d9bc1b197a842c9dc25abc806e534197ec54f50becc0d03445ac717e312925451fbb03bc5a7614a4344155f10be26aa457aba6986ec5b5f90c8b93d6fb5bf840b6e73e9448cdbceda61aad855ed3f59118916a1c563cdd7e909d8315880726b77198f99b70ccc26641d8a1a5af6ca9c418dbc2e6caff8748ef369e921b5a425b7e3441cd13074fe8b1e4541bcabb356b2c8b8d4a5105fbabd5a70ca77bb9e4de3e736dfc60739a80e4e2c99ec282998e773325673a6b6a20000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): db169649a6c5e4aec6aff6dede813a06186373f4ef9bb5ce2ddedb17f4e359dcb87573adde7c12a297729a8b0ada133958d17288cd102db71fd2c2b2d81c809d7088b90c2e9f919eeb16c8ceb36da6706f46456e25168d24b04ee1871d7364d179405d31524a97a9e0e6912a64dfd0ae98801d933140680248183b00f36c7ecbde3d2619d48979eb2d7763c302046b3110380a8b633f0621b77fe215f93daeb3409db1f97a57a695343d86fc0e8ecfd581fcbeaa30c8f4eb80cb7d399e57fe0b1f297a3fa67241ee06084c13fa821bc710d017032cffb1ec8c14a39b7c6f28f9c3ba74e59114f561dcca5b7b8471569cc75ab2b3ea1d151ce3197b4584f3c49201000000000000000000000000000000
mod (big endian): 0000000000000000a2b6a673563273e7982928ec992c4e0ea83907c6df36e7e34d9ebb77ca705abdba5f10a5d4b8c8b256b3abbc41451e8bfe7430d11c44e3b725a4b521e969f38e74f8af6c2ebc8d419ccaf65a1a8a1d6426cc0cb7998f19776b72805831d809e9d7cd63c5a1168911593fed55d8aa61dacedb8c44e9736e0b84bfb56f3db9c8905f5bec8669ba7a45aa26be105f1544434a61a7c53bb0fb51549212e317c75a44030dccbe504fc57e1934e506c8ab25dcc942a897b1c19b3d8f24cb83c939f0bffbae5425200f9e4039cf1895bd89d54f04464ded36fc087007fb62a95324dd67a9546f54e8599b8d216e15b01dddadc71dd4483527eae51a5445af03b021352f
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 0000000000000000000000000000000192c4f384457b19e31c151deab3b25ac79c5671847b5bcadc61f51491e574bac3f9286f7c9ba3148cecb1ff2c0317d010c71b82fa134c0806ee4172a63f7a291f0bfe579e397dcb80ebf4c830aabefc81d5cf8e0efc863d3495a6577af9b19d40b3ae3df915e27fb721063f638b0a3810316b0402c363772deb7989d419263ddecb7e6cf3003b184802684031931d8098aed0df642a91e6e0a9974a52315d4079d164731d87e14eb0248d16256e45466f70a66db3cec816eb9e919f2e0cb988709d801cd8b2c2d21fb72d10cd8872d1583913da0a8b9a7297a2127cdead7375b8dc59e3f417dbde2dceb59beff4736318063a81dedef6afc6aee4c5a6499616db
m (little endian): 80b113024501b6376837c9a7743688f37ca903146836f42b785cbc47364938852004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004208538493647bc5c782bf436681403a97cf3883674a7c9376837b601450213b180
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004208538493647bc5c782bf436681403a97cf3883674a7c9376837b601450213b180
in_len: 65
in: 0421aa9f139fb5b57f08f0d275798c3c297354728a51882ee57838f82bcc341e408ad7bcd87ba6f16440fd9a7a6aa8c67c825760f4841129c06a46ac7488c7b6f3
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
generated key: 60633bf5ff7f0000602decdafd0700003281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
  x: 68ba1f7a5d0bf233d2bc4993c360526212ee137598513adbd30da68840468132
  y: ed41ba66b3c2adbc5701017b1950e1686648649276a9481ca0a479c1c5ea3d95
  z: 0000000000000000000000000000000000000000000000000000000000000001
  k: f6e190614fcd4621dc96afb3da3ea63db115f6d946db03400eb2ea7f960db6bb
private_key: 60633bf5ff7f0000602decdafd0700003281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
public key: 60633bf5ff7f00001931ecdafd070020401e34cc2bf83878e52e88518a725473293c8c7975d2f0087fb5b59f139faa21f3b6c78874ac466ac0291184f46057827cc6a86a7a9afd4064f1a67bd8bcd78a0100000000000000000000000000000000000000000000000000000000000000
provided buffer length: 65
computed_shared_secret: 8a54973de994bbcf8dfd64f4843bf3e55b6f79893a00f664cc738ca9756df25200
curl: (35) Unknown SSL protocol error in connection to www.apple.com:-9820

https://www.microsoft.com

Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl -k https://www.microsoft.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 2100000000000000000000000000005020c639f5ff7f00004f308ad6581143047c06a65c8991f2a0852068921b9b412fd62177ec96e78116679594a3bb7d465c5726b9b2c2f046358f1d9dc9c0e0d06eb250f161b6ea7e86c21f318ad1236805867253e53fab6331ff130e0e79fa917d4ee97a5757dfb981ed6911d8dd2a4eeeee63e983a81f75c480127c688607b6512ed22f61753834049dc39bf381f1644a886f2edfc6f8073afb55f86c218e0013bb2445961d3d431ec5d1b4f8ae9da6772f4387af40cc55025ea44838ecddb1681c62a0a7fcd92442b1a9b7f3b38b2d6eeeb114c627b9f9548d84ccee61ed3e56cdddb5dfa95cff0d2bbb1d724183651a06b49021d7d0fbef6ca73ac3fb6f0eb1021d4ccd42ad10d3000000000000000031c5e167140de80305c46ad4266f0db508ea0a135298e7bd440ff1e4a4af6483e4d4dbde2c324f2abb4948952299269a4e47224258957ab818a6c1cad67577de1df35bf2611a796b04848a736cd5a8569d6804118691e8331b07b142c34df00324b7d67b0d4fb0f35becb1fb8e6289725cace95cfe5ac59905eea037f6403d2a682709ac026dc1510c85e69dafa62f7b1d740bf72edb2a16c3f6377f6084f6ef53ab41eb850969e3065cfd1081b9b96de43415c3f7fca176ef0241bd1fcd4fce4b151cba76ae38dba38d3925321ecbbda5c321b6af082e6af0233f3a7217710e84aa695d9d0f40f9daf9c62d4680767a1b4cff24124e82dc99551694b954803601000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: abc1291f9259304252027df9636a852e5064fdd63989e57f1d4dc1558da16f39
sig_len: 256
sig (big endian): 22c47592cc956931eb1e0c35bb31e5a048e6071e669cfa2536559821d4e5b48b2c184660edd83547995b7dcbdd64b4cf4558d0b5b8c0934fc377e6694f3f21505d6a425764b4757972a407b8dbe237de70a72a3b3ca98e2471de7340da61e3e941915cf65dcbd183177ab0233d51e198941febf79f8d97308507b2efa481b29f965390381fa27bae096f7fa5f993d835d877718d9326b1b5b8b0787d076025f58ac5fd6bc3969071ef504880d211d0ca726f562f759eaa04499cc4cb944f9f66d776d2ebf935b505553a96c86497e74ec51cccf6affbd988a37a4c7d7b42c736e815c40f49302bf0876b47520821be8cde41b325fa1376b2b8f63633aa3ace28
n of mod: 33
mod_len: 256
mod (little endian): 4f308ad6581143047c06a65c8991f2a0852068921b9b412fd62177ec96e78116679594a3bb7d465c5726b9b2c2f046358f1d9dc9c0e0d06eb250f161b6ea7e86c21f318ad1236805867253e53fab6331ff130e0e79fa917d4ee97a5757dfb981ed6911d8dd2a4eeeee63e983a81f75c480127c688607b6512ed22f61753834049dc39bf381f1644a886f2edfc6f8073afb55f86c218e0013bb2445961d3d431ec5d1b4f8ae9da6772f4387af40cc55025ea44838ecddb1681c62a0a7fcd92442b1a9b7f3b38b2d6eeeb114c627b9f9548d84ccee61ed3e56cdddb5dfa95cff0d2bbb1d724183651a06b49021d7d0fbef6ca73ac3fb6f0eb1021d4ccd42ad10d30000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): 31c5e167140de80305c46ad4266f0db508ea0a135298e7bd440ff1e4a4af6483e4d4dbde2c324f2abb4948952299269a4e47224258957ab818a6c1cad67577de1df35bf2611a796b04848a736cd5a8569d6804118691e8331b07b142c34df00324b7d67b0d4fb0f35becb1fb8e6289725cace95cfe5ac59905eea037f6403d2a682709ac026dc1510c85e69dafa62f7b1d740bf72edb2a16c3f6377f6084f6ef53ab41eb850969e3065cfd1081b9b96de43415c3f7fca176ef0241bd1fcd4fce4b151cba76ae38dba38d3925321ecbbda5c321b6af082e6af0233f3a7217710e84aa695d9d0f40f9daf9c62d4680767a1b4cff24124e82dc99551694b954803601000000000000000000000000000000
mod (big endian): 0000000000000000d310ad42cd4c1d02b10e6ffbc33aa76ceffbd0d72190b4061a658341721dbb2b0dff5ca9dfb5ddcd563eed61eecc848d54f9b927c614b1ee6e2d8bb3f3b7a9b14224d9fca7a0621c68b1ddec3848a45e0255cc40af87432f77a69daef8b4d1c51e433d1d964524bb13008e216cf855fb3a07f8c6df2e6f884a64f181f39bc39d04343875612fd22e51b60786687c1280c4751fa883e963eeee4e2addd81169ed81b9df57577ae94e7d91fa790e0e13ff3163ab3fe5537286056823d18a311fc2867eeab661f150b26ed0e0c0c99d1d8f3546f0c2b2b926575c467dbba39495671681e796ec7721d62f419b1b92682085a0f291895ca6067c04431158d68a304f
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 00000000000000000000000000000001368054b994165599dc824e1224ff4c1b7a7680462dc6f9daf9400f9d5d69aa840e7117723a3f23f06a2e08afb621c3a5bdcb1e3225398da3db38ae76ba1c154bce4fcd1fbd4102ef76a1fcf7c31534e46db9b98110fd5c06e3690985eb41ab53eff684607f37f6c3162adb2ef70b741d7b2fa6af9de6850c51c16d02ac0927682a3d40f637a0ee0599c55afe5ce9ac5c7289628efbb1ec5bf3b04f0d7bd6b72403f04dc342b1071b33e891861104689d56a8d56c738a84046b791a61f25bf31dde7775d6cac1a618b87a95584222474e9a269922954849bb2a4f322cdedbd4e48364afa4e4f10f44bde79852130aea08b50d6f26d46ac40503e80d1467e1c531
m (little endian): 396fa18d55c14d1d7fe58939d6fd64502e856a63f97d0252423059921f29c1ab2004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420abc1291f9259304252027df9636a852e5064fdd63989e57f1d4dc1558da16f39
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420abc1291f9259304252027df9636a852e5064fdd63989e57f1d4dc1558da16f39
in_len: 65
in: 0498b3a550e103ceddb2667612ed7691e8e1cf830569b6cd5c6b6aa169166e14432c328b4df2062419520a7442adc9beca8a845f62105f5d97d7b1d02d60b80809
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
generated key: 60633bf5ff7f000023246489f90700a03281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
  x: 68ba1f7a5d0bf233d2bc4993c360526212ee137598513adbd30da68840468132
  y: ed41ba66b3c2adbc5701017b1950e1686648649276a9481ca0a479c1c5ea3d95
  z: 0000000000000000000000000000000000000000000000000000000000000001
  k: f6e190614fcd4621dc96afb3da3ea63db115f6d946db03400eb2ea7f960db6bb
private_key: 60633bf5ff7f000023246489f90700a03281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
public key: 60633bf5ff7f00003a2f6489f907009043146e1669a16a6b5ccdb6690583cfe1e89176ed127666b2ddce03e150a5b3980908b8602dd0b1d7975d5f10625f848acabec9ad42740a52192406f24d8b322c0100000000000000000000000000000000000000000000000000000000000000
provided buffer length: 65
computed_shared_secret: 3779abd1feae04bad6982f362b6e06c68c370f4ffafb30d0282bf53b79a0b015
curl: (35) Unknown SSL protocol error in connection to www.microsoft.com:-9820

https://www.github.com

Darling [/Volumes/SystemRoot/home/me/git/darling/src/external/corecrypto]$ curl -k https://www.github.com
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 2100000000000000000000000000002020c639f5ff7f00004b0f915670bb808cf95205e66df4bc7c0cb945c9ff1470eae957d1f8ae1508c56b4a4d5c47760be91598523f51f604332a7ee8cbc91e14f5027db0e1231ab7c55009f03160db85f70c8227df61079632065205853aaaccd50a14313fc459751ab3b0e59065a27f955924c384b605ccb004b53015f6294096fbe8eac19c4ab6ac96b8d3570d665f61a8a7578c44c8cac0e7fa5ac10896537fd1dd0601a27e8cff239a1b9bda6177fd61b111824b83aeeebe6e2af08c732fb889b3a88410d30561738dc52eba95e0bbbfbc9075f9f393c39977ca58104d5de10b33a99a571930c54c42987afd46778a9b74a47360b5b9ced37d7072ad284fc13a0c973cf2aa3cc60000000000000000c7f39fef732b4d6b01e36ee20e94500e11d44fd393bb391be876adc44e4b6ee159f8f17b1ba4eef47ebdb0913faf8bb13ddbeeb21b20157785bc9a010bc1353f93edef5fb5bf860669fae14ed4517e1249cca4d1282b3a661a519c60af32c36509fda36e9a61fdf8192077c3e262d2f65602409957a32ac6fa8e8f4ec6180e4f528bc71a41c9fe2ae8e7e1c0d5e7e46d493b8ba5a6276872aaa48978e9da9f05c60e0c713c939f3869c9991395f3f367195c95f7f214cf97d1b5fba0dfa0dbe7f62fc3012f1717d41b05243f42499e300a7294368777b8e963f0f1a23887527dfb38bb1012d6245beb293305ded0b248cc02892639502687f386c704801e984a01000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: e9a465c9aa7fa98f1932639966f6a3b9bea28e13e823d45aad0b6a095862eece
sig_len: 256
sig (big endian): aee46827420f1dafc40f9f7a2a831a7522fe8830eb931c951518aa816901d9ed4e49de1648a7d06b8752aba6767d23e244d1d40e2502410183f8ce2cae57a12adacf3101611599ef34c26d165a3775fd61ae1884149fa19284e515cf69903eca3bc9892370212e90c2c5d75d84df0a08deab598721b37bd21745d4d8d3ff24873ddc0953675e07a3b8fa923e500cf413ad65297e0513a43ba07cad1e0a0057ce4d1e38871fa0f5a8f260c1983e7a8b78c81abebd073aa7f75653078f3c842a88e60f172871a09da79fd97081af7da84fa0418823880963b732eb76fb21f587b1572c39a01a1e097f83e36a7d869725866a4ecb1c6431428a469831dba7164a9c
n of mod: 33
mod_len: 256
mod (little endian): 4b0f915670bb808cf95205e66df4bc7c0cb945c9ff1470eae957d1f8ae1508c56b4a4d5c47760be91598523f51f604332a7ee8cbc91e14f5027db0e1231ab7c55009f03160db85f70c8227df61079632065205853aaaccd50a14313fc459751ab3b0e59065a27f955924c384b605ccb004b53015f6294096fbe8eac19c4ab6ac96b8d3570d665f61a8a7578c44c8cac0e7fa5ac10896537fd1dd0601a27e8cff239a1b9bda6177fd61b111824b83aeeebe6e2af08c732fb889b3a88410d30561738dc52eba95e0bbbfbc9075f9f393c39977ca58104d5de10b33a99a571930c54c42987afd46778a9b74a47360b5b9ced37d7072ad284fc13a0c973cf2aa3cc60000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): c7f39fef732b4d6b01e36ee20e94500e11d44fd393bb391be876adc44e4b6ee159f8f17b1ba4eef47ebdb0913faf8bb13ddbeeb21b20157785bc9a010bc1353f93edef5fb5bf860669fae14ed4517e1249cca4d1282b3a661a519c60af32c36509fda36e9a61fdf8192077c3e262d2f65602409957a32ac6fa8e8f4ec6180e4f528bc71a41c9fe2ae8e7e1c0d5e7e46d493b8ba5a6276872aaa48978e9da9f05c60e0c713c939f3869c9991395f3f367195c95f7f214cf97d1b5fba0dfa0dbe7f62fc3012f1717d41b05243f42499e300a7294368777b8e963f0f1a23887527dfb38bb1012d6245beb293305ded0b248cc02892639502687f386c704801e984a01000000000000000000000000000000
mod (big endian): 0000000000000000c63caaf23c970c3ac14f28ad72707dd3ceb9b56073a4749b8a7746fd7a98424cc53019579aa9330be15d4d1058ca7799c393f3f97590bcbfbbe095ba2ec58d736105d31084a8b389b82f738cf02a6ebeeeae834b8211b161fd7761da9b1b9a23ff8c7ea20106ddd17f539608c15afae7c0cac8448c57a7a8615f660d57d3b896acb64a9cc1eae8fb964029f61530b504b0cc05b684c32459957fa26590e5b0b31a7559c43f31140ad5ccaa3a8505520632960761df27820cf785db6031f00950c5b71a23e1b07d02f5141ec9cbe87e2a3304f6513f529815e90b76475c4d4a6bc50815aef8d157e9ea7014ffc945b90c7cbcf46de60552f98c80bb7056910f4b
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 000000000000000000000000000000014a981e8004c786f387265039268902cc48b2d0de053329eb5b24d61210bb38fb7d528738a2f1f063e9b877873694720a309e49423f24051bd417172f01c32ff6e7dba0dfa0fbb5d197cf14f2f7955c1967f3f3951399c969389f933c710c0ec6059fdae97889a4aa726827a6a58b3b496de4e7d5c0e1e7e82afec9411ac78b524f0e18c64e8f8efac62aa35799400256f6d262e2c3772019f8fd619a6ea3fd0965c332af609c511a663a2b28d1a4cc49127e51d44ee1fa690686bfb55fefed933f35c10b019abc857715201bb2eedb3db18baf3f91b0bd7ef4eea41b7bf1f859e16e4b4ec4ad76e81b39bb93d34fd4110e50940ee26ee3016b4d2b73ef9ff3c7
m (little endian): ceee6258096a0bad5ad423e8138ea2beb9a3f666996332198fa97faac965a4e92004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420e9a465c9aa7fa98f1932639966f6a3b9bea28e13e823d45aad0b6a095862eece
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420e9a465c9aa7fa98f1932639966f6a3b9bea28e13e823d45aad0b6a095862eece
in_len: 65
in: 04d7ef528148620ff0bab10bdd9aca9d1fe656a3b2c321804f79281d21bc99e1fea1e16b18060647afc87aba67210d364a1b268643e9fb9153bf19262624d70608
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
generated key: 60633bf5ff7f000082244c46fd0700903281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
  x: 68ba1f7a5d0bf233d2bc4993c360526212ee137598513adbd30da68840468132
  y: ed41ba66b3c2adbc5701017b1950e1686648649276a9481ca0a479c1c5ea3d95
  z: 0000000000000000000000000000000000000000000000000000000000000001
  k: f6e190614fcd4621dc96afb3da3ea63db115f6d946db03400eb2ea7f960db6bb
private_key: 60633bf5ff7f000082244c46fd0700903281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
public key: 60633bf5ff7f00000d314c46fd070000fee199bc211d28794f8021c3b2a356e61f9dca9add0bb1baf00f62488152efd70806d724262619bf5391fbe94386261b4a360d2167ba7ac8af470606186be1a10100000000000000000000000000000000000000000000000000000000000000
provided buffer length: 65
computed_shared_secret: 3c0dead91a5e5c386bd4e8cfa49988d7267d484582d1ac66340e0895bb187b24

The first two (Apple and Microsoft) seem to be having the same issue, but the last one (GitHub) seems to be a different issue; it appears to just crash. I'm going to investigate these and try to get all websites working.

stuaxo commented 4 years ago

I believe github recently switched to TLS 1.2, could this be why ?

facekapow commented 4 years ago

Actually, upon further investigation, GitHub is actually not failing. Using cURL's -i option, it turns out that GitHub doesn't use https://www.github.com, only https://github.com:

Darling [/Volumes/SystemRoot/home/me/git/darling/build]$ curl -ki https://www.github.com > curl-darling-https-www-github-com.txt
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
DARLING CRYPTO IMPL: void ccrsa_init_pub(ccrsa_pub_ctx_t, const cc_unit *, const cc_unit *)
key: 2100000000000000000000000000006020c639f5ff7f00004b0f915670bb808cf95205e66df4bc7c0cb945c9ff1470eae957d1f8ae1508c56b4a4d5c47760be91598523f51f604332a7ee8cbc91e14f5027db0e1231ab7c55009f03160db85f70c8227df61079632065205853aaaccd50a14313fc459751ab3b0e59065a27f955924c384b605ccb004b53015f6294096fbe8eac19c4ab6ac96b8d3570d665f61a8a7578c44c8cac0e7fa5ac10896537fd1dd0601a27e8cff239a1b9bda6177fd61b111824b83aeeebe6e2af08c732fb889b3a88410d30561738dc52eba95e0bbbfbc9075f9f393c39977ca58104d5de10b33a99a571930c54c42987afd46778a9b74a47360b5b9ced37d7072ad284fc13a0c973cf2aa3cc60000000000000000c7f39fef732b4d6b01e36ee20e94500e11d44fd393bb391be876adc44e4b6ee159f8f17b1ba4eef47ebdb0913faf8bb13ddbeeb21b20157785bc9a010bc1353f93edef5fb5bf860669fae14ed4517e1249cca4d1282b3a661a519c60af32c36509fda36e9a61fdf8192077c3e262d2f65602409957a32ac6fa8e8f4ec6180e4f528bc71a41c9fe2ae8e7e1c0d5e7e46d493b8ba5a6276872aaa48978e9da9f05c60e0c713c939f3869c9991395f3f367195c95f7f214cf97d1b5fba0dfa0dbe7f62fc3012f1717d41b05243f42499e300a7294368777b8e963f0f1a23887527dfb38bb1012d6245beb293305ded0b248cc02892639502687f386c704801e984a01000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oid: 0609608648016503040201
digest_len: 32
digest: cc54911d604a29f594eb0af3d1ac5a537eac4df92d883b2a26fc0185c09edd34
sig_len: 256
sig (big endian): 4aadaf7349ba8cdf38f615d4f2397277f96049d7a57b1ef99a79e813bf581f5d36f87c8d1881f110165af55d306232ef5afb680dcdf7e3e4a8aa11d1516605fa77b4d4c794055d71619fb6ad6f55815cb02f7045df55fef6fae57776d668b89d0256643b2f897c6736823c47ff44a379a9c6da841a67041b5d07189ba26a232624637ccb3cc1f8ba375deb6ca36c4db165808cf7219cdca1fa8b91ae87d5b3faf79d137f79bc3b9b76c6bf9d2463a25b1df1911d7d199007927fb37a8b7e470d4793b98d055c51d76e0f8660d9b8420cf72dcb2571e352e8dd2658534dbef1ba0cc152766decad4e6fe03a94476c7e01b110cd576babf584cad14812b00e6128
n of mod: 33
mod_len: 256
mod (little endian): 4b0f915670bb808cf95205e66df4bc7c0cb945c9ff1470eae957d1f8ae1508c56b4a4d5c47760be91598523f51f604332a7ee8cbc91e14f5027db0e1231ab7c55009f03160db85f70c8227df61079632065205853aaaccd50a14313fc459751ab3b0e59065a27f955924c384b605ccb004b53015f6294096fbe8eac19c4ab6ac96b8d3570d665f61a8a7578c44c8cac0e7fa5ac10896537fd1dd0601a27e8cff239a1b9bda6177fd61b111824b83aeeebe6e2af08c732fb889b3a88410d30561738dc52eba95e0bbbfbc9075f9f393c39977ca58104d5de10b33a99a571930c54c42987afd46778a9b74a47360b5b9ced37d7072ad284fc13a0c973cf2aa3cc60000000000000000
exp (little endian): 010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
mod_recip (little endian): c7f39fef732b4d6b01e36ee20e94500e11d44fd393bb391be876adc44e4b6ee159f8f17b1ba4eef47ebdb0913faf8bb13ddbeeb21b20157785bc9a010bc1353f93edef5fb5bf860669fae14ed4517e1249cca4d1282b3a661a519c60af32c36509fda36e9a61fdf8192077c3e262d2f65602409957a32ac6fa8e8f4ec6180e4f528bc71a41c9fe2ae8e7e1c0d5e7e46d493b8ba5a6276872aaa48978e9da9f05c60e0c713c939f3869c9991395f3f367195c95f7f214cf97d1b5fba0dfa0dbe7f62fc3012f1717d41b05243f42499e300a7294368777b8e963f0f1a23887527dfb38bb1012d6245beb293305ded0b248cc02892639502687f386c704801e984a01000000000000000000000000000000
mod (big endian): 0000000000000000c63caaf23c970c3ac14f28ad72707dd3ceb9b56073a4749b8a7746fd7a98424cc53019579aa9330be15d4d1058ca7799c393f3f97590bcbfbbe095ba2ec58d736105d31084a8b389b82f738cf02a6ebeeeae834b8211b161fd7761da9b1b9a23ff8c7ea20106ddd17f539608c15afae7c0cac8448c57a7a8615f660d57d3b896acb64a9cc1eae8fb964029f61530b504b0cc05b684c32459957fa26590e5b0b31a7559c43f31140ad5ccaa3a8505520632960761df27820cf785db6031f00950c5b71a23e1b07d02f5141ec9cbe87e2a3304f6513f529815e90b76475c4d4a6bc50815aef8d157e9ea7014ffc945b90c7cbcf46de60552f98c80bb7056910f4b
exp (big endian): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001
mod_recip (big endian): 000000000000000000000000000000014a981e8004c786f387265039268902cc48b2d0de053329eb5b24d61210bb38fb7d528738a2f1f063e9b877873694720a309e49423f24051bd417172f01c32ff6e7dba0dfa0fbb5d197cf14f2f7955c1967f3f3951399c969389f933c710c0ec6059fdae97889a4aa726827a6a58b3b496de4e7d5c0e1e7e82afec9411ac78b524f0e18c64e8f8efac62aa35799400256f6d262e2c3772019f8fd619a6ea3fd0965c332af609c511a663a2b28d1a4cc49127e51d44ee1fa690686bfb55fefed933f35c10b019abc857715201bb2eedb3db18baf3f91b0bd7ef4eea41b7bf1f859e16e4b4ec4ad76e81b39bb93d34fd4110e50940ee26ee3016b4d2b73ef9ff3c7
m (little endian): 34dd9ec08501fc262a3b882df94dac7e535aacd1f30aeb94f5294a601d9154cc2004000501020403650148866009060d30313000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100
em (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420cc54911d604a29f594eb0af3d1ac5a537eac4df92d883b2a26fc0185c09edd34
em_prime (big endian): 0001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d060960864801650304020105000420cc54911d604a29f594eb0af3d1ac5a537eac4df92d883b2a26fc0185c09edd34
in_len: 65
in: 04de1a42939ba3109f467841a59ed2fafcbc81d0c68db42254f989708fb82769c88a2a41ba95f4a3b16346fee0bb640e9cf2f3d4bac5e48760e85463f5617c700b
struct ccrng_state *ccDRBGGetRngState(int *) just putting this here until we build CommonCrypto
generated key: 60633bf5ff7f000082246475fa0700c03281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
  x: 68ba1f7a5d0bf233d2bc4993c360526212ee137598513adbd30da68840468132
  y: ed41ba66b3c2adbc5701017b1950e1686648649276a9481ca0a479c1c5ea3d95
  z: 0000000000000000000000000000000000000000000000000000000000000001
  k: f6e190614fcd4621dc96afb3da3ea63db115f6d946db03400eb2ea7f960db6bb
private_key: 60633bf5ff7f000082246475fa0700c03281464088a60dd3db3a51987513ee12625260c39349bcd233f20b5d7a1fba68953deac5c179a4a01c48a9769264486668e150197b010157bcadc2b366ba41ed0100000000000000000000000000000000000000000000000000000000000000bbb60d967feab20e4003db46d9f615b13da63edab3af96dc2146cd4f6190e1f6
public key: 60633bf5ff7f00000d316475fa070050c86927b88f7089f95422b48dc6d081bcfcfad29ea54178469f10a39b93421ade0b707c61f56354e86087e4c5bad4f3f29c0e64bbe0fe4663b1a3f495ba412a8a0100000000000000000000000000000000000000000000000000000000000000
provided buffer length: 65
computed_shared_secret: 8d822253a652dbcadc88b0d0a24e110c0725b35a8f31dc18597ff564d1b0f40300
HTTP/1.1 301 Moved Permanently
Content-length: 0
Location: https://github.com/

Using https://github.com works as expected (see the attached text file; the output is too long to paste here directly).

As for the curl: (35) Unknown SSL protocol error in connection to <whatever-website>:-9820 error, it seems that it has something to do with this:

https://github.com/darlinghq/darling-coretls/blob/75d206423aa64771e9960b6df8d99aea73456a39/lib/tls_handshake_priv.h#L77

ahyattdev commented 4 years ago

@facekapow wow, this is impressive work!!!

I looked into GitHub not working. www.github.com serves a 301 redirect to github.com.

Using curl -v on Linux reveals that they both use TLS 1.3. Linux curl also chooses the cipher TLS_AES_128_GCM_SHA256 for both.

facekapow commented 4 years ago

@ahyattdev Thanks! Actually, I've already got all websites (or at least all the ones I tested) working over in the PR (darlinghq/darling-corecrypto#6). Like I mentioned above and like you discovered, Github was actually working fine, it's just that I forgot that cURL doesn't follow redirects automatically.

Right now, the problem I'm trying to resolve is why cURL thinks our certificate chain is invalid. I've managed to get libSecurity to talk to trustd, but it still thinks our certificate chain is invalid. Assuming LLDB is printing values correctly (and I have had no reason to think that part of it is broken), I think there's an issue in libxpc with message decoding, because it seems that the request is sent and received properly (mach_msg returns a ~5KiB wide buffer containing lots of strings like "Digicert blah-blah-blah") but when xpc_unpack is called on the buffer, it returns an empty dictionary.

ahyattdev commented 4 years ago

@facekapow well that's even better news.

I saw your comment about our sudo missing -l, and homebrew needing it, so I'm working on that right now.

I wouldn't be surprised if the issue was with XPC, that's tricky stuff. Good to hear you're making progress

ahyattdev commented 4 years ago

@facekapow that usage of sudo should work now

bugaevc commented 4 years ago

Shall we close this?

facekapow commented 4 years ago

I think we can. Any websites that are still having issues connecting should probably have their own issues, as the vast majority of websites should now work fine.

Example of website with some minor connection issues: Github. Trying to connect to Github for the first time in a new prefix fails, but any time after that it succeeds. I'm going to look into that later.