Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit bb8ee8d

Browse files
author
andrewstech
committed
Update owl.js to use file system to read public and private keys
1 parent 3bdcc21 commit bb8ee8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/owl.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ async function loadKeyStore() {
66
const keystore = jose.JWK.createKeyStore();
77

88
// Load the public key for encryption from environment variable
9-
const publicKey = process.env.PUBLIC_KEY;
9+
const publicKey = fs.readFileSync('keys/public_key.pem', 'utf8');
1010
if (!publicKey) {
1111
throw new Error('Public key not found in environment variables');
1212
}
1313
await keystore.add(publicKey, 'pem');
1414

1515
// Load the private key for decryption from environment variable
16-
const privateKey = process.env.PRIVATE_KEY;
16+
const privateKey = fs.readFileSync('keys/private_key.pem', 'utf8');
1717
if (!privateKey) {
1818
throw new Error('Private key not found in environment variables');
1919
}

0 commit comments

Comments
 (0)