File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ export async function generateCACertificate(options: {
202
202
} ) ;
203
203
204
204
const privateKeyBuffer = await crypto . subtle . exportKey ( "pkcs8" , keyPair . privateKey as CryptoKey ) ;
205
- const privateKeyPem = arrayBufferToPem ( privateKeyBuffer , "RSA PRIVATE KEY" ) ;
205
+ const privateKeyPem = arrayBufferToPem ( privateKeyBuffer , "PRIVATE KEY" ) ;
206
206
const certificatePem = certificate . toString ( "pem" ) ;
207
207
208
208
return {
@@ -383,7 +383,7 @@ export class CA {
383
383
const generatedCertificate = {
384
384
key : arrayBufferToPem (
385
385
await crypto . subtle . exportKey ( "pkcs8" , leafKeyPair . privateKey as CryptoKey ) ,
386
- "RSA PRIVATE KEY"
386
+ "PRIVATE KEY"
387
387
) ,
388
388
cert : certificate . toString ( "pem" ) ,
389
389
ca : this . caCert . toString ( "pem" )
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ nodeOnly(() => {
161
161
expect ( caCertificate . cert . length ) . to . be . greaterThan ( 1000 ) ;
162
162
expect ( caCertificate . cert . split ( '\n' ) [ 0 ] ) . to . equal ( '-----BEGIN CERTIFICATE-----' ) ;
163
163
expect ( caCertificate . key . length ) . to . be . greaterThan ( 1000 ) ;
164
- expect ( caCertificate . key . split ( '\n' ) [ 0 ] ) . to . equal ( '-----BEGIN RSA PRIVATE KEY-----' ) ;
164
+ expect ( caCertificate . key . split ( '\n' ) [ 0 ] ) . to . equal ( '-----BEGIN PRIVATE KEY-----' ) ;
165
165
} ) ;
166
166
167
167
it ( "should generate a CA certificate that can be used to create domain certificates" , async ( ) => {
@@ -173,7 +173,7 @@ nodeOnly(() => {
173
173
expect ( cert . length ) . to . be . greaterThan ( 1000 ) ;
174
174
expect ( cert . split ( '\n' ) [ 0 ] ) . to . equal ( '-----BEGIN CERTIFICATE-----' ) ;
175
175
expect ( key . length ) . to . be . greaterThan ( 1000 ) ;
176
- expect ( key . split ( '\n' ) [ 0 ] ) . to . equal ( '-----BEGIN RSA PRIVATE KEY-----' ) ;
176
+ expect ( key . split ( '\n' ) [ 0 ] ) . to . equal ( '-----BEGIN PRIVATE KEY-----' ) ;
177
177
} ) ;
178
178
179
179
it ( "should be able to generate a CA certificate that passes lintcert checks" , async function ( ) {
You can’t perform that action at this time.
0 commit comments