dpkiubcc265650 2018-09-05 10:21
浏览 132
已采纳

Amphp Artax bug

i used following very basic example of amphp/artax

$URL can be any url e.g. http://www.yahoo.com

$promises[$URI] = Amp\call(function () use ($client, $URI) {
                // "yield" inside a coroutine awaits the resolution of the promise
                // returned from Client::request(). The generator is then continued.
                $response = yield $client->request($URI);

                // Same for the body here. Yielding an Amp\ByteStream\Message
                // buffers the entire message.
                $body = yield $response->getStatus();

                return $body;
            });

        $responses = Amp\Promise\wait(Amp\Promise\all($promises));

and getting following error

    Fatal error: Uncaught Amp\Socket\CryptoException: Crypto negotiation failed: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature type in /var/www/html/vendor/amphp/socket/src/Internal/functions.php:118
Stack trace:
#0 /var/www/html/vendor/amphp/amp/lib/Loop/NativeDriver.php(172): Amp\Socket\Internal\{closure}('am', Resource id #293, Object(Amp\Deferred))
#1 /var/www/html/vendor/amphp/amp/lib/Loop/NativeDriver.php(68): Amp\Loop\NativeDriver->selectStreams(Array, Array, 4.782)
#2 /var/www/html/vendor/amphp/amp/lib/Loop/Driver.php(130): Amp\Loop\NativeDriver->dispatch(true)
#3 /var/www/html/vendor/amphp/amp/lib/Loop/Driver.php(70): Amp\Loop\Driver->tick()
#4 /var/www/html/vendor/amphp/amp/lib/Loop.php(76): Amp\Loop\Driver->run()
#5 /var/www/html/vendor/amphp/amp/lib/functions.php(158): Amp\Loop::run(Object(Closure))
#6 /var/www/html/parseradvance.php(77): Amp\Promise\wait(Object(Amp\Internal\PrivatePromise))
#7 {main}
  t in /var/www/html/vendor/amphp/socket/src/Internal/functions.php on line 118

can anybody help me out the issue I had already set cainfo=curl.pem

thanks in advance

  • 写回答

2条回答 默认 最新

  • drpkcwwav20524605 2018-09-14 18:04
    关注

    This is caused by a server configured with weak ciphers, which Artax rejects by default. Weaker ciphers can be allowed by passing a custom ClientTlsContext instance to the client on creation and setting withSecurityLevel(1), which defaults to 2. See also https://github.com/amphp/artax/issues/174.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题