mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-03-09 02:12:50 +00:00
Prevent self signing by fingerprint instead of keyId
This commit is contained in:
@@ -802,8 +802,8 @@ User.prototype.sign = function(primaryKey, privateKeys) {
|
||||
if (privateKey.isPublic()) {
|
||||
throw new Error('Need private key for signing');
|
||||
}
|
||||
if (privateKey.primaryKey.getKeyId().equals(primaryKey.getKeyId())) {
|
||||
throw new Error('Not implemented for self signing');
|
||||
if (privateKey.primaryKey.getFingerprint() === primaryKey.getFingerprint()) {
|
||||
throw new Error('Not implemented for self signing');
|
||||
}
|
||||
signingKeyPacket = privateKey.getSigningKeyPacket();
|
||||
if (!signingKeyPacket) {
|
||||
|
||||
Reference in New Issue
Block a user