Skip to content

Commit

Permalink
Update owl.js to use relative file paths for reading keys
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewstech committed Jul 29, 2024
1 parent 2dc1aa2 commit 5c6e18a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/owl.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ async function loadKeyStore() {
const keystore = jose.JWK.createKeyStore();

// Load the public key for encryption from environment variable
const publicKey = fs.readFileSync('/keys/public_key.pem', 'utf8');
if (!publicKey) {
throw new Error('Public key not found in environment variables');
}
await keystore.add(publicKey, 'pem');
//const publicKey = fs.readFileSync('/keys/public_key.pem', 'utf8');
//if (!publicKey) {
// throw new Error('Public key not found in environment variables');
//}
//await keystore.add(publicKey, 'pem');

// Load the private key for decryption from environment variable
const privateKey = fs.readFileSync('/keys/private_key.pem', 'utf8');
Expand Down

0 comments on commit 5c6e18a

Please sign in to comment.