RPC failed; curl 56 SSLRead() return error Symptoms During a clone or fetch, Git fails with the following
coreTLS实现:https://opensource.apple.com/tarballs/ 这里面源码就用了Hook发现确实在用的SecTrustEvaluate();收发函数观察发现是SSLWrite和SSLRead...SecTrustEvaluate address var SSLWrite_prt = Module.findExportByName("Security", "SSLWrite"); var SSLRead_prt...= Module.findExportByName("Security", "SSLRead"); if (SSLWrite_prt == null || SSLRead_prt =...(SSLContextRef context, void *data, size_t dataLength, size_t *processed); Interceptor.attach(SSLRead_prt..., { onEnter: function (args) { console.log("SSLRead(" + "" + ")");
需要关心的函数只有两个sslread和sslwrite: 代码: SSLRead Performs a normal application-level read operation....OSStatus SSLRead ( SSLContextRef context, void *data, size_t dataLength, size_t *processed ); Parameters...MSHookFunction((void *)SSLWrite, (void *)_hook_SSLWrite, (void **)&_real_SSLWrite); MSHookFunction((void *)SSLRead..., (void *)_hook_SSLRead, (void **)&_real_SSLRead); 这个可以参考ssl kill switch 的相关代码(其余的代码请自行实现)。
cURL error 56: SSLRead() return error -9806 目前在 OSX 下,发现使用 HomeBrew 装的 PHP 7.0 有这个问题,解决方案是重新 brew 安装
上面最重要的就是这个方法: doReadData 上面这个方法后面我们添加的几个标签(开始读取数据 CFStream , 开始读取数据 SSLRead, 开始读取数据普通的形式 等等)都是对这个方法的解释
Left Speed 0 13.5M 0 81920 0 0 85 0 46:21:29 0:16:00 46:05:29 0 curl: (56) SSLRead
领取专属 10元无门槛券
手把手带您无忧上云