1.0.1-0 • Published 3 years ago

pcertaddon v1.0.1-0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
3 years ago

npm run build

export class CertificateBundle { SignedCertPem : string PrivateKeyPem : string }

export class CerticateManager {

/**
 * @param password - The string
 * @param commonName - The string
 * @param country - The string
 * @param location - The string
 * @param company - The string
 * @param ounit - The string
 * @param year - The number
 * @param serial -- The number
 * Return: {SignedCertPem,PrivateKeyPem}
 */
CreateCARoot(password :string, commonName :string, country :string, location :string, company :string, ounit :string, year :number, serial:number) :CertificateBundle;
/**
 * @param password - The string
 * @param rootKeyPem
 * @param rootCertPem
 * @param serverPassword
 * @param commonName
 * @param country
 * @param location
 * @param company
 * @param ounit
 * @param year
 * @param serialNumber
 * Return: {SignedCertPem,PrivateKeyPem}
 * */
CreateServerCert(password, rootKeyPem, rootCertPem, serverPassword, commonName, country, location, company, ounit, year, serialNumber) :CertificateBundle;

/**
 * @param password - The string
 * @param commonName  - The string
 * @param email  - The string
 * @param country  - The string
 * @param location  - The string
 * @param company  - The string
 * @param ounit  - The string
 * */
CreateCertificateSigningReq(password :string, commonName :string, email :string, country :string, location :string, company :string, ounit :string) :CertificateBundle;


/*
 * @param password - The string
 * @param rootKeyPem - The string
 * @param rootCertPem - The string
 * @param userCSRPem - The string
 * @param year -The number
 * @param serialNumber -The number
* */
SignUserCertificateReq(password :string, rootKeyPem :string, rootCertPem :string, userCSRPem :string, year :number, serialNumber : number) :string;


/*
 * @param commonName  - The string
 * @param email  - The string * @param rootKeyPem - The string
 * @param childCertPem - The string
 * @param rootCertPem - The string
 * */
VerifyCertWithCNAndEmail(commonName :string, email :string, childCertPem :string, rootCertPem :string) : boolean;
/*
 * @param commonName  - The string
 * @param email  - The string * @param rootKeyPem - The string
 * @param userCSRPem - The string
 * */
VerifyCSRWithCNAndEmail(commonName :string, email :string, userCSRPem :string) :boolean;
/*
 * @param childCertPem  - The string
 * @param rootCertPem  - The string * @param rootKeyPem - The string
 * */
VerifySignedCertificate(childCertPem :string, rootCertPem :string) :boolean;

}

1.0.1-0

3 years ago