Made shared credential accept work

This commit is contained in:
Marcos Zuriaga 2016-10-02 18:06:53 +02:00
parent 14c2ec26fb
commit 29fc96eb6d
No known key found for this signature in database
GPG key ID: 7D15585354D072FF

View file

@ -77,10 +77,9 @@ angular.module('passmanApp')
$scope.acceptShareRequest = function(share_request){
console.log('Accepted share request', share_request);
var crypted_shared_key = share_request.shared_key;
var _vault = VaultService.getActiveVault();
var private_key = EncryptService.decryptString(VaultService.getActiveVault().private_sharing_key);
console.log(_vault);return;
//private_key = ShareService.rsaPrivateKeyFromPEM(private_key);
private_key = ShareService.rsaPrivateKeyFromPEM(private_key);
crypted_shared_key = private_key.decrypt(forge.util.decode64(crypted_shared_key));
crypted_shared_key = EncryptService.encryptString(crypted_shared_key);