{"id":263,"date":"2019-03-05T16:18:25","date_gmt":"2019-03-05T13:18:25","guid":{"rendered":"https:\/\/itbru.ru\/?p=263"},"modified":"2019-03-20T10:05:34","modified_gmt":"2019-03-20T07:05:34","slug":"nextcloud-ssl-fail","status":"publish","type":"post","link":"https:\/\/itbru.ru\/index.php\/2019\/03\/05\/nextcloud-ssl-fail\/","title":{"rendered":"Nextcloud \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0447\u0442\u0443. stream_socket_enable_crypto(): SSL operation failed with code 1"},"content":{"rendered":"\n<p>Nextcloud \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u044c\u043c\u0430. \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0438\u0441\u044c\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443:  <br>&#171;stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed at \/var\/www\/nextcloud\/3rdparty\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Transport\/StreamBuffer.php#94&#187;<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0435. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Nextcloud \u0436\u0438\u0432\u0435\u0442 \u0432 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0437\u0430\u0432\u0435\u0440\u0435\u043d\u044b \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0423\u0426) \u0413\u0430\u043b\u043e\u0447\u043a\u0438 &#171;\u0434\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432\u0441\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c&#187; \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043d\u0435\u0442, \u0437\u043d\u0430\u0447\u0438\u0442&#8230; We need to go deeper<\/p>\n\n\n\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \/nextcloud\/lib\/private\/Mail\/Mailer.php (\u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c  &#171;\/var\/www\/nextcloud\/lib\/private\/Mail\/Mailer.php&#187;), \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0431\u043b\u043e\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438(\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e 250-257 \u0441\u0442\u0440\u043e\u043a\u0438):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        $transport = new \\Swift_SmtpTransport();\n        $transport-&gt;setTimeout($this-&gt;config-&gt;getSystemValue('mail_smtptimeout', 10));\n        $transport-&gt;setHost($this-&gt;config-&gt;getSystemValue('mail_smtphost', '127.0.0.1'));\n        $transport-&gt;setPort($this-&gt;config-&gt;getSystemValue('mail_smtpport', 25));\n        if ($this-&gt;config-&gt;getSystemValue('mail_smtpauth', false)) {\n                $transport-&gt;setUsername($this-&gt;config-&gt;getSystemValue('mail_smtpname', ''));\n                $transport-&gt;setPassword($this-&gt;config-&gt;getSystemValue('mail_smtppassword', ''));\n                $transport-&gt;setAuthMode($this-&gt;config-&gt;getSystemValue('mail_smtpauthtype', 'LOGIN'));<\/code><\/pre>\n\n\n\n<p>\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$transport-&gt;setStreamOptions(array('ssl' =&gt; array('allow_self_signed' =&gt; true, 'verify_peer' =&gt; false)));<\/code><\/pre>\n\n\n\n<p>\u042d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e\u0447\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nextcloud \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u044c\u043c\u0430. \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0438\u0441\u044c\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443: &#171;stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-263","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/posts\/263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/comments?post=263"}],"version-history":[{"count":2,"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/posts\/263\/revisions"}],"predecessor-version":[{"id":279,"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/posts\/263\/revisions\/279"}],"wp:attachment":[{"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/media?parent=263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/categories?post=263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itbru.ru\/index.php\/wp-json\/wp\/v2\/tags?post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}