Skip to content

Commit

Permalink
keep previous constructor with new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
JhontSouth committed Dec 7, 2023
1 parent 3c7ed5e commit 8803011
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,12 @@ export class CertificateServiceClientCredentialsFactory extends ServiceClientCre
'CertificateServiceClientCredentialsFactory.constructor(): missing certificatePrivateKey.'
);

if (certificateThumbprintOrx5c.includes('-----BEGIN CERTIFICATE-----')) {
if (certificateThumbprintOrx5c?.includes('-----BEGIN CERTIFICATE-----')) {
this.x5c = certificateThumbprintOrx5c;
ok(
certificateThumbprintOrx5c.trim(),
'CertificateServiceClientCredentialsFactory.constructor(): missing x5c.'
);
} else {
ok(
certificateThumbprintOrx5c.trim(),
'CertificateServiceClientCredentialsFactory.constructor(): missing certificateThumbprint.'
'CertificateServiceClientCredentialsFactory.constructor(): missing certificateThumbprint or x5c value.'
);
this.certificateThumbprint = certificateThumbprintOrx5c;
this.x5c = x5c;
Expand Down

0 comments on commit 8803011

Please sign in to comment.