-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server & Client Convert in progress
- Loading branch information
Universal Web
committed
May 29, 2023
1 parent
d2ef75a
commit ca8b9be
Showing
38 changed files
with
198 additions
and
756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,145 +1,41 @@ | ||
import { createState } from 'state/index.js'; | ||
const state = await createState('certificates'); | ||
const { | ||
certificates: { | ||
createDomainCertificate, | ||
createIdentityCertificate, | ||
createRootCertificate, | ||
createEphemeralCertificate, | ||
createMasterCertificate | ||
}, | ||
certificate: { save } | ||
} = state; | ||
const domainCert = await createDomainCertificate({ | ||
import { createProfile } from '#certificate'; | ||
import { currentPath } from '#directory'; | ||
const dirname = currentPath(import.meta); | ||
const domainCert = await createProfile({ | ||
template: { | ||
ephemeral: { | ||
version: 1, | ||
ip: '127.0.0.1', | ||
port: 443, | ||
host: 'universal.web', | ||
locality: { | ||
state: 'NJ', | ||
country: 'US' | ||
}, | ||
start: Date.now(), | ||
end: 99999999990, | ||
}, | ||
master: { | ||
version: 1, | ||
algo: 'default', | ||
hostname: 'universal.web', | ||
organization: { | ||
name: 'UW', | ||
}, | ||
locality: { | ||
state: 'NJ', | ||
country: 'US' | ||
}, | ||
start: Date.now(), | ||
end: 99999999990, | ||
} | ||
} | ||
}); | ||
console.log('DOMAIN CERTIFICATE', domainCert); | ||
const disCert = await createDomainCertificate({ | ||
template: { | ||
ephemeral: { | ||
version: 1, | ||
ip: '127.0.0.1', | ||
port: 443, | ||
host: 'main.dis', | ||
locality: { | ||
state: 'NJ', | ||
country: 'US' | ||
}, | ||
start: Date.now(), | ||
end: 99999999990, | ||
}, | ||
master: { | ||
ephemeral: { | ||
version: 1, | ||
ip: '::1', | ||
algo: 'default', | ||
hostname: 'main.dis', | ||
organization: { | ||
name: 'UW', | ||
port: 8888, | ||
host: 'universal.web', | ||
entity: { | ||
name: 'Universal Web', | ||
}, | ||
locality: { | ||
state: 'NJ', | ||
state: 'FL', | ||
country: 'US' | ||
}, | ||
start: Date.now(), | ||
end: 99999999990, | ||
} | ||
} | ||
}); | ||
console.log('DIS CERTIFICATE', disCert); | ||
const identityCert = await createIdentityCertificate({ | ||
template: { | ||
ephemeral: { | ||
version: 1, | ||
algo: 'default', | ||
start: Date.now(), | ||
end: 99999999990, | ||
}, | ||
master: { | ||
version: 1, | ||
algo: 'default', | ||
start: Date.now(), | ||
end: 99999999990, | ||
} | ||
} | ||
encryptConnectionId: true, | ||
compression: true, | ||
headerCompression: true, | ||
}, | ||
master: {}, | ||
}, | ||
savePath: `${dirname}/../services`, | ||
certificateName: 'universal.web' | ||
}); | ||
console.log('IDENTITY CERTIFICATE', identityCert); | ||
const rootCert = await createRootCertificate({ | ||
console.log('DOMAIN CERTIFICATE CREATED'); | ||
const identityCert = await createProfile({ | ||
template: { | ||
ephemeral: { | ||
id: '1', | ||
parent: '0', | ||
version: 1, | ||
host: 'us.east.dis', | ||
ip: '192.168.1.1', | ||
port: 80, | ||
pad: 900, | ||
issuer: 'Sentivate', | ||
issuerID: '0', | ||
algo: 'default', | ||
start: Date.now(), | ||
end: 99999999990, | ||
master: '0' | ||
}, | ||
master: { | ||
version: 1, | ||
algo: 'default', | ||
id: '0', | ||
type: 'root', | ||
issuer: 'Sentivate', | ||
issuerID: '0', | ||
country: 'US', | ||
contact: 'issuer', | ||
start: Date.now(), | ||
end: 99999999990, | ||
} | ||
} | ||
}); | ||
console.log('ROOT CERTIFICATE', rootCert); | ||
const masterCert = await createMasterCertificate({ | ||
template: { | ||
version: 1, | ||
algo: 'default', | ||
start: Date.now(), | ||
end: 99999999990, | ||
} | ||
}); | ||
console.log('MASTER CERTIFICATE', masterCert); | ||
const ephemeralCert = await createEphemeralCertificate({ | ||
template: { | ||
version: 1, | ||
algo: 'default', | ||
start: Date.now(), | ||
end: 99999999990, | ||
}, | ||
master: masterCert | ||
savePath: `${dirname}/../profiles`, | ||
certificateName: 'default' | ||
}); | ||
console.log('EPHEMERAL CERTIFICATE', ephemeralCert); | ||
save(identityCert, `${__dirname}/../profiles`, 'default'); | ||
save(domainCert, `${__dirname}/../services`, 'universal.web'); | ||
save(disCert, `${__dirname}/../services`, 'main.dis'); | ||
console.log('IDENTITY CERTIFICATE CREATED'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
state: 'FL', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.