![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Certificates management tool using openssl wrapper pem to create and sign certificates
To install npm install cert-base
Here we're going to create a CA cert, and then use it to sign a cert
/**
* First we create a CA cert
*/
const cb = new CertBase({
path: 'path/to/a/folder'
})
cb.createCACert('commonName_for_ca')
.then(result => {
console.log(result.key, result.cert)
})
/**
* Then we sign a cert using the CA cert
*/
cg.getCertByHost('commonName_for_hostname')
.then(result => {
console.log(result.key, result.cert)
})
const cb = new CertBase({
path: 'path/to/a/folder',
subject: {
country: 'CN',
organization: 'CertBase',
organizationUnit: 'CertBase Certification'
},
opensslPath: '/path/to/your/openssl'
})
where
openssl
executable. This is because you may want to use a custom openssl version instead of the system default openssl
executable which is the default value of this field// subject default settings
{
country: 'CN',
organization: 'CertBase',
organizationUnit: 'CertBase Certification'
}
For more subject options and documentations, check here. This is because pem is used inside this package to do all openssl works
cb.createCACert(commonName)
.then(result => {
// result object has 2 fields:
//
// key : the generated key content
// cert: the generated cert content
})
where
cb.isCAExist()
returns true
or false
Before you call this method, you must have a ca cert generated, or an error will be thrown
cb.getCertByHost(hostname)
.then(result => {})
where
If you had the same hostname cert generated before, it will use that cert and won't generate a new one
cb.listSignedCerts().then(certs => {
// certs is an array of signed domains
})
List all self signed certificates, certs
is an array like this:
['www.google.com', 'github.com', ...]
cb.removeAllCerts().then()
Removes everything inside the storage directory
cb.removeCert(hostname).then()
Removes a self signed cert with a given name
cb.removeAllSignedCerts().then()
Removes all self signed certs(empty certs
directory)
The certs are stored under the folder path the user give when calling the constructor function.
Strorage structure:
cert-path/
ca/
ca.crt
ca.key
certs/
domain1/
domain1.crt
domain1.key
domain2/
domain2.crt
domain2.key
...
FAQs
Certificates generator and manager
The npm package cert-base receives a total of 10 weekly downloads. As such, cert-base popularity was classified as not popular.
We found that cert-base demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.