diff --git a/src/openpgp.js b/src/openpgp.js index 4c671583..6da8e839 100644 --- a/src/openpgp.js +++ b/src/openpgp.js @@ -163,14 +163,14 @@ export function reformatKey({privateKey, userIds=[], passphrase="", keyExpiratio const revocationCertificate = await key.getRevocationCertificate(); key.revocationSignatures = []; - return { + return convertStreams({ key: key, privateKeyArmored: key.armor(), publicKeyArmored: key.toPublic().armor(), revocationCertificate: revocationCertificate - }; + }); }).catch(onError.bind(null, 'Error reformatting keypair')); }