mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(core): Add SSH key generation (#6006)
* basic prefs and ssh key generation * review change * cleanup save * lint fix
This commit is contained in:
committed by
GitHub
parent
953198e092
commit
71ed1f410c
@@ -0,0 +1,18 @@
|
||||
import Container from 'typedi';
|
||||
import { License } from '../../License';
|
||||
import { generateKeyPairSync } from 'crypto';
|
||||
|
||||
export function isVersionControlEnabled() {
|
||||
const license = Container.get(License);
|
||||
return license.isVersionControlLicensed();
|
||||
}
|
||||
|
||||
export async function generateSshKeyPair() {
|
||||
const keyPair = generateKeyPairSync('ed25519', {
|
||||
privateKeyEncoding: { format: 'pem', type: 'pkcs8' },
|
||||
publicKeyEncoding: { format: 'pem', type: 'spki' },
|
||||
});
|
||||
|
||||
console.log(keyPair.privateKey);
|
||||
console.log(keyPair.publicKey);
|
||||
}
|
||||
Reference in New Issue
Block a user