File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ async function pemToRawEcPrivateKey(pem: string): Promise<string> {
2222/**
2323 * Extracts the raw private key (hex) from a PEM-encoded Ed25519 private key.
2424 */
25- export async function pemToRawEd25519PrivateKey ( derKey : string | Buffer ) : Promise < string > {
25+ export async function pemToRawPrivateKey ( derKey : string | Buffer ) : Promise < string > {
2626 // If it's a base64 string, convert to Buffer
2727 const keyBuffer = typeof derKey === 'string' ? Buffer . from ( derKey , 'base64' ) : derKey
2828
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import { KeyAlgorithm } from '@openwallet-foundation/askar-nodejs'
1818import { keyAlgorithmToCurve } from '../../utils/constant'
1919import { generateSecretKey , getCertificateValidityForSystem , getTypeFromCurve } from '../../utils/helpers'
2020
21- import { pemToRawEd25519PrivateKey } from './crypto-util'
21+ import { pemToRawPrivateKey } from './crypto-util'
2222import { type X509CreateCertificateOptionsDto } from './x509.types'
2323
2424class x509Service {
@@ -131,7 +131,7 @@ class x509Service {
131131 const agent = agentReq . agent
132132 if ( ! options . privateKey ) throw new Error ( '[ImportX509Certificates] privateKey is required' )
133133 agent . config . logger . debug ( `Start validating keys` )
134- const secretHexKey = await pemToRawEd25519PrivateKey ( options . privateKey )
134+ const secretHexKey = await pemToRawPrivateKey ( options . privateKey )
135135 const privateKey = TypedArrayEncoder . fromHex ( secretHexKey )
136136
137137 agent . config . logger . debug ( `Decode certificate` )
You can’t perform that action at this time.
0 commit comments