Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/270925

Change subject: Remove the option to override the certificate of Yandex MT 
client
......................................................................

Remove the option to override the certificate of Yandex MT client

This was only required for nodejs 0.10.x versions
Now we use version 4.2.4

Change-Id: Iea55ea38a7ce9570a82fce42a796ee1c37df92fc
---
M config.dev.yaml
M config.prod.yaml
M mt/Yandex.js
3 files changed, 1 insertion(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/25/270925/1

diff --git a/config.dev.yaml b/config.dev.yaml
index ced19d3..f3ae651 100644
--- a/config.dev.yaml
+++ b/config.dev.yaml
@@ -60,10 +60,6 @@
         yandex:
           api: https://translate.yandex.net
           key: null
-          # SSL certificate of yandex server. Only required while using Node 
0.10.x on Ubuntu
-          # Setting a value like 
'/etc/ssl/certs/Certum_Trusted_Network_CA.pem' will help
-          # to prevent certificate rejection by nodejs.
-          certificate: null
       registry:
         source:
           - ab
diff --git a/config.prod.yaml b/config.prod.yaml
index a0d9708..7260e52 100644
--- a/config.prod.yaml
+++ b/config.prod.yaml
@@ -61,10 +61,6 @@
           api: https://translate.yandex.net
           proxy: http://url-downloader.wikimedia.org:8080
           key: null
-          # SSL certificate of yandex server. Only required while using Node 
0.10.x on Ubuntu
-          # Setting a value like 
'/etc/ssl/certs/Certum_Trusted_Network_CA.pem' will help
-          # to prevent certificate rejection by nodejs.
-          certificate: null
       registry:
         source:
           - ab
diff --git a/mt/Yandex.js b/mt/Yandex.js
index 6c64923..b406d4a 100644
--- a/mt/Yandex.js
+++ b/mt/Yandex.js
@@ -1,11 +1,9 @@
 var
        util = require( 'util' ),
        preq = require( 'preq' ),
-       fs = require( 'fs' ),
        BBPromise = require( 'bluebird' ),
        MTClient = require( './MTClient.js' ),
-       yandexLanguageNameMap,
-       certificate;
+       yandexLanguageNameMap;
 
 // Yandex language codes can differ from the language codes that
 // we use.
@@ -57,14 +55,6 @@
                }
        };
 
-       if ( this.conf.mt.yandex.certificate ) {
-               certificate = certificate || fs.readFileSync( 
this.conf.mt.yandex.certificate );
-               // Dont ask why.
-               postData.ca = certificate;
-               postData.agentOptions = {
-                       ca: certificate
-               };
-       }
        return preq.post( postData ).then( function ( response ) {
                return response.body.text[ 0 ];
        } );

-- 
To view, visit https://gerrit.wikimedia.org/r/270925
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea55ea38a7ce9570a82fce42a796ee1c37df92fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to