certifyRequest: (
username: any,
csr: any,
opts: any,
) => Promise<
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written?: undefined;
}
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written: any[];
}
| {
errorCode?: undefined;
errors: any[];
key: {
caId: string;
certificatePem: string;
chainPem: any;
createdAt: string;
expiresAt: string;
id: string;
jwsAlg: string;
keyAlg: string;
kid: string;
label: string;
notAfter: string;
notBefore: string;
serialHex: string;
source: string;
subject: string;
thumbprint: string;
} & { privateKeyHeld: boolean; state: string };
ok: boolean;
written: any[];
}
| {
errorCode: any;
errors: any;
issued?: undefined;
key?: undefined;
ok: boolean;
}
| {
errorCode?: undefined;
errors?: undefined;
issued: any;
key: {
caId: string;
certificatePem: string;
chainPem: any;
createdAt: string;
expiresAt: string;
id: string;
jwsAlg: string;
keyAlg: string;
kid: string;
label: string;
notAfter: string;
notBefore: string;
serialHex: string;
source: string;
subject: string;
thumbprint: string;
} & { privateKeyHeld: boolean; state: string };
ok: boolean;
},
> = certifyRequest
Type Declaration
-
- (
username: any,
csr: any,
opts: any,
): Promise<
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written?: undefined;
}
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written: any[];
}
| {
errorCode?: undefined;
errors: any[];
key: {
caId: string;
certificatePem: string;
chainPem: any;
createdAt: string;
expiresAt: string;
id: string;
jwsAlg: string;
keyAlg: string;
kid: string;
label: string;
notAfter: string;
notBefore: string;
serialHex: string;
source: string;
subject: string;
thumbprint: string;
} & { privateKeyHeld: boolean; state: string };
ok: boolean;
written: any[];
}
| {
errorCode: any;
errors: any;
issued?: undefined;
key?: undefined;
ok: boolean;
}
| {
errorCode?: undefined;
errors?: undefined;
issued: any;
key: {
caId: string;
certificatePem: string;
chainPem: any;
createdAt: string;
expiresAt: string;
id: string;
jwsAlg: string;
keyAlg: string;
kid: string;
label: string;
notAfter: string;
notBefore: string;
serialHex: string;
source: string;
subject: string;
thumbprint: string;
} & { privateKeyHeld: boolean; state: string };
ok: boolean;
},
>
-
Parameters
- username: any
- csr: any
- opts: any
Returns Promise<
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written?: undefined;
}
| {
errorCode: string;
errors: string[];
key?: undefined;
ok: boolean;
written: any[];
}
| {
errorCode?: undefined;
errors: any[];
key: {
caId: string;
certificatePem: string;
chainPem: any;
createdAt: string;
expiresAt: string;
id: string;
jwsAlg: string;
keyAlg: string;
kid: string;
label: string;
notAfter: string;
notBefore: string;
serialHex: string;
source: string;
subject: string;
thumbprint: string;
} & { privateKeyHeld: boolean; state: string };
ok: boolean;
written: any[];
}
| {
errorCode: any;
errors: any;
issued?: undefined;
key?: undefined;
ok: boolean;
}
| {
errorCode?: undefined;
errors?: undefined;
issued: any;
key: {
caId: string;
certificatePem: string;
chainPem: any;
createdAt: string;
expiresAt: string;
id: string;
jwsAlg: string;
keyAlg: string;
kid: string;
label: string;
notAfter: string;
notBefore: string;
serialHex: string;
source: string;
subject: string;
thumbprint: string;
} & { privateKeyHeld: boolean; state: string };
ok: boolean;
},
>
a promise of { ok: true, key, issued } — the key pair as
written and pki.js's record — or { ok: false, errorCode, errors }
Certifies the key in a person's own PKCS #10 request as an RFC 7523 signing key and adds it to their entry, with no private half anywhere.
Refused for no directory (STS-OAUTH-0085), nobody by that name (STS-PKI-0109), at the cap (STS-PKI-0223), a bad label (STS-PKI-0225), and whatever
pki.certifySigningRequest()refuses.