1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-25 02:12:17 -05:00

Merge pull request #322 from whiteout-io/dev/WO-955

[WO-955] WO-03-023 STARTTLS Setting leads to opportunistic STARTSSL
This commit is contained in:
Tankred Hase 2015-04-22 18:57:13 +02:00
commit 56bd5222d2
5 changed files with 14 additions and 4 deletions

View File

@ -62,7 +62,7 @@
"grunt-svgmin": "~1.0.0",
"grunt-svgstore": "~0.3.4",
"iframe-resizer": "^2.8.3",
"imap-client": "~0.14.0",
"imap-client": "~0.14.1",
"jquery": "~2.1.1",
"mailbuild": "^0.3.7",
"mailreader": "~0.4.0",
@ -70,7 +70,7 @@
"ng-infinite-scroll": "~1.1.2",
"openpgp": "^1.0.0",
"pgpbuilder": "~0.6.0",
"pgpmailer": "~0.9.0",
"pgpmailer": "~0.9.1",
"sinon": "~1.7.3",
"tcp-socket": "~0.5.0",
"time-grunt": "^1.0.0",

View File

@ -68,12 +68,14 @@ var SetCredentialsCtrl = function($scope, $location, $routeParams, $q, auth, con
host: $scope.imapHost.toLowerCase(),
port: $scope.imapPort,
secure: imapEncryption === ENCRYPTION_METHOD_TLS,
requireTLS: imapEncryption === ENCRYPTION_METHOD_STARTTLS,
ignoreTLS: imapEncryption === ENCRYPTION_METHOD_NONE
},
smtp: {
host: $scope.smtpHost.toLowerCase(),
port: $scope.smtpPort,
secure: smtpEncryption === ENCRYPTION_METHOD_TLS,
requireTLS: smtpEncryption === ENCRYPTION_METHOD_STARTTLS,
ignoreTLS: smtpEncryption === ENCRYPTION_METHOD_NONE
}
};

View File

@ -94,6 +94,8 @@ Auth.prototype.getCredentials = function() {
var credentials = {
imap: {
secure: self.imap.secure,
requireTLS: self.imap.requireTLS,
ignoreTLS: self.imap.ignoreTLS,
port: self.imap.port,
host: self.imap.host,
ca: self.imap.ca,
@ -105,6 +107,8 @@ Auth.prototype.getCredentials = function() {
},
smtp: {
secure: self.smtp.secure,
requireTLS: self.smtp.requireTLS,
ignoreTLS: self.smtp.ignoreTLS,
port: self.smtp.port,
host: self.smtp.host,
ca: self.smtp.ca,

View File

@ -53,6 +53,7 @@ ConnectionDoctor.prototype.configure = function(credentials) {
port: this.credentials.imap.port,
secure: this.credentials.imap.secure,
ignoreTLS: this.credentials.imap.ignoreTLS,
requireTLS: this.credentials.imap.requireTLS,
ca: this.credentials.imap.ca,
tlsWorkerPath: this._workerPath,
auth: {
@ -65,6 +66,7 @@ ConnectionDoctor.prototype.configure = function(credentials) {
this._smtp = new SmtpClient(this.credentials.smtp.host, this.credentials.smtp.port, {
useSecureTransport: this.credentials.smtp.secure,
ignoreTLS: this.credentials.smtp.ignoreTLS,
requireTLS: this.credentials.smtp.requireTLS,
ca: this.credentials.smtp.ca,
tlsWorkerPath: this._workerPath,
auth: {

View File

@ -71,13 +71,15 @@ describe('Login (Set Credentials) Controller unit test', function() {
host: scope.imapHost.toLowerCase(),
port: scope.imapPort,
secure: true,
ignoreTLS: false
ignoreTLS: false,
requireTLS: false
},
smtp: {
host: scope.smtpHost.toLowerCase(),
port: scope.smtpPort,
secure: false,
ignoreTLS: false
ignoreTLS: false,
requireTLS: true
}
};