diff --git a/src/key/key.js b/src/key/key.js index 1662ca5a..3c7475ad 100644 --- a/src/key/key.js +++ b/src/key/key.js @@ -257,8 +257,8 @@ class Key { * @async */ async getSigningKey(keyID = null, date = new Date(), userID = {}, config = defaultConfig) { - const primaryKey = this.keyPacket; await this.verifyPrimaryKey(date, userID, config); + const primaryKey = this.keyPacket; try { helper.checkKeyRequirements(primaryKey, config); } catch (err) { @@ -316,8 +316,8 @@ class Key { * @async */ async getEncryptionKey(keyID, date = new Date(), userID = {}, config = defaultConfig) { - const primaryKey = this.keyPacket; await this.verifyPrimaryKey(date, userID, config); + const primaryKey = this.keyPacket; try { helper.checkKeyRequirements(primaryKey, config); } catch (err) {