Function generateCertificate

  • Generate x509 certificate. Duration is in seconds. X509 certificates currently use UTCTime format for notBefore and notAfter. This means:

    • Only second resolution.
    • Minimum date for validity is 1970-01-01T00:00:00Z (inclusive).
    • Maximum date for valdity is 2049-12-31T23:59:59Z (inclusive).

    Parameters

    • __namedParameters: {
          certId: CertId;
          duration: number;
          issuerAttrsExtra?: {
              [key: string]: string[];
          }[];
          issuerPrivateKey: PrivateKey;
          now?: Date;
          subjectAttrsExtra?: {
              [key: string]: string[];
          }[];
          subjectKeyPair: {
              privateKey: PrivateKey;
              publicKey: PublicKey;
          };
      }
      • certId: CertId
      • duration: number
      • Optional issuerAttrsExtra?: {
            [key: string]: string[];
        }[]
      • issuerPrivateKey: PrivateKey
      • Optional now?: Date
      • Optional subjectAttrsExtra?: {
            [key: string]: string[];
        }[]
      • subjectKeyPair: {
            privateKey: PrivateKey;
            publicKey: PublicKey;
        }

    Returns Promise<Certificate>

Generated using TypeDoc