mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
perf: 支持七牛云
This commit is contained in:
@@ -201,9 +201,6 @@ async function getWebCryptoKeyPair(keyPem) {
|
||||
}
|
||||
|
||||
/* Decode PEM and import into CryptoKeyPair */
|
||||
if (encodingType === 'pkcs1') {
|
||||
encodingType = 'pkcs8';
|
||||
}
|
||||
const privateKeyDec = x509.PemConverter.decodeFirst(keyPem.toString());
|
||||
const privateKey = await crypto.webcrypto.subtle.importKey('pkcs8', privateKeyDec, sigalg, true, ['sign']);
|
||||
const publicKey = await crypto.webcrypto.subtle.importKey('jwk', jwk, sigalg, true, ['verify']);
|
||||
|
||||
@@ -12,7 +12,7 @@ export type AccessDefine = Registrable & {
|
||||
};
|
||||
};
|
||||
export interface IAccessService {
|
||||
getById(id: any): Promise<any>;
|
||||
getById<T = any>(id: any): Promise<T>;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
|
||||
Reference in New Issue
Block a user