Skip to main content

Managed certificate

Generating a managed certificate

import {
KeyClient,
KeyType,
ManagedCertificateParams,
SubjectCertificateParams,
} from '@bloock/sdk';

const keyClient = new KeyClient();

// Load a managed key
const _certificate = await keyClient.newManagedCertificate(
new ManagedCertificateParams(
KeyType.Rsa2048,
new SubjectCertificateParams('Bloock'),
2
)
);

Loading an existing managed certificate

import { KeyClient } from '@bloock/sdk';

const keyClient = new KeyClient();

// Load a managed certificate
const _certificate = await keyClient.loadManagedCertificate('certificate id');