Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/station-id.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function getStationId ({ secretsDir, passphrase }) {

try {
const keypair = await loadKeypair(keystore, passphrase)
console.log('Loaded Station ID: %s', keypair.publicKey)
console.error('Loaded Station ID: %s', keypair.publicKey)
return keypair
} catch (err) {
if (err.code === 'ENOENT' && err.path === keystore) {
Expand Down Expand Up @@ -84,7 +84,7 @@ async function tryUpgradePlaintextToCiphertext (passphrase, keystore, maybeCiphe

// re-create the keypair file with encrypted keypair
await storeKeypair(passphrase, keystore, keypair)
console.log('Encrypted the Station ID file using the provided PASSPHRASE.')
console.error('Encrypted the Station ID file using the provided PASSPHRASE.')
return keypair
}
/**
Expand Down Expand Up @@ -120,7 +120,7 @@ async function generateKeypair (keystore, passphrase) {
)
const publicKey = Buffer.from(await subtle.exportKey('spki', keyPair.publicKey)).toString('hex')
const privateKey = Buffer.from(await subtle.exportKey('pkcs8', keyPair.privateKey)).toString('hex')
console.log('Generated a new Station ID:', publicKey)
console.error('Generated a new Station ID:', publicKey)
await storeKeypair(passphrase, keystore, { publicKey, privateKey })
return { publicKey, privateKey }
}
Expand Down