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

Merge pull request #267 from whiteout-io/dev/WO-893

Dev/wo 893
This commit is contained in:
Felix Hammerl 2015-02-11 10:45:57 +01:00
commit c94c419b38
4 changed files with 14 additions and 6 deletions

View File

@ -13,7 +13,7 @@ module.exports = appCfg;
*/
appCfg.config = {
cloudUrl: 'https://keys.whiteout.io',
hkpUrl: 'https://pgp.mit.edu',
hkpUrl: 'http://keyserver.ubuntu.com',
privkeyServerUrl: 'https://keychain.whiteout.io',
adminUrl: 'https://admin-node.whiteout.io',
settingsUrl: 'https://settings.whiteout.io/autodiscovery/',

View File

@ -20,7 +20,7 @@ var PublickeyImportCtrl = function($scope, $q, keychain, pgp, hkp, dialog, appCo
// scope variables
//
$scope.hkpUrl = appConfig.config.hkpUrl.replace('https://', '');
$scope.hkpUrl = appConfig.config.hkpUrl.replace(/http[s]?:\/\//, '');
//
// scope functions

View File

@ -28,8 +28,8 @@ PGP.prototype.generateKeys = function(options) {
}
// generate keypair
name = options.realname ? options.realname.replace(/[&\/\\#,+()$~%.'":*?<>{}]/g, '').trim() + ' ' : '';
userId = name + '<' + options.emailAddress + '>';
name = options.realname ? options.realname.replace(/[&\/\\#,+()$~%.'":*?<>{}]/g, '').trim() : '';
userId = name + ' <' + options.emailAddress + '>';
passphrase = (options.passphrase) ? options.passphrase : undefined;
resolve({

View File

@ -86,6 +86,10 @@ describe('PGP Crypto Api unit tests', function() {
publicKeyArmored: keys.publicKeyArmored
});
}).then(function() {
var keyParams = pgp.getKeyParams();
expect(keyParams.userIds[0].name).to.equal('');
expect(keyParams.userIds[0].emailAddress).to.equal(user);
return pgp.encrypt('secret', [keyObject.publicKeyArmored]);
}).then(function(ct) {
expect(ct).to.exist;
@ -117,7 +121,9 @@ describe('PGP Crypto Api unit tests', function() {
publicKeyArmored: keys.publicKeyArmored
});
}).then(function() {
expect(pgp.getKeyParams().userIds[0].name).to.equal('Jon Doe');
var keyParams = pgp.getKeyParams();
expect(keyParams.userIds[0].name).to.equal('Jon Doe');
expect(keyParams.userIds[0].emailAddress).to.equal(user);
return pgp.encrypt('secret', [keyObject.publicKeyArmored]);
}).then(function(ct) {
@ -150,7 +156,9 @@ describe('PGP Crypto Api unit tests', function() {
publicKeyArmored: keys.publicKeyArmored
});
}).then(function() {
expect(pgp.getKeyParams().userIds[0].name).to.equal('Jon Doe');
var keyParams = pgp.getKeyParams();
expect(keyParams.userIds[0].name).to.equal('Jon Doe');
expect(keyParams.userIds[0].emailAddress).to.equal(user);
return pgp.encrypt('secret', [keyObject.publicKeyArmored]);
}).then(function(ct) {