Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I imported type script package getting undefined (reading 'certificationRequestFromPem') , when I display forge it has all functions #68388

Open
EBYSAJU opened this issue Jan 30, 2024 · 0 comments

Comments

@EBYSAJU
Copy link

EBYSAJU commented Jan 30, 2024

TypeError: Cannot read properties of undefined (reading 'certificationRequestFromPem')

const pemCert =

`-----BEGIN CERTIFICATE-----

MIIBtDCCAV6gAwIBAgIJAIuTWSP4vzEfMAoGCCqGSM49BAMCMCkxJzAlBgNVBAMM

HmRldi5leGFtcGxlLmNvbS9hcGkvdjEvd2ViaG9vay5jZXJ0MCAXDTIxMDUxNDE1

MTMxN1oYDzIxMjEwMzA5MTUxMzE3WjAqMScwJQYDVQQDDB5kZXYuZXhhbXBsZS5j

b20vYXBpL3YxL3dlYmhvb2suY2VydDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA

BI9p6rqvO0pN8UuWrlD6aI9JkquhSd5ABvg5dPLrJZTVWgWvZd0Z2LHjQlxcN1gb

TVdwSD8ZuZb9Wz4i+zM6ZMzDLqijgYkwgYgwCgYIKoZIzj0EAwIDSAAwRQIhAOch

Mj89J55jFlMlJukd6RmeKgN20btP4x/2ikbtCYHAiBPNNcqq66zbxEPxoi60qyG

uvgtcRyIwJsh9+qL9LFQDQ==

-----END CERTIFICATE-----`;

// Parse the certificate

console.log(forge.pki.certificationRequestFromPem(pemCert))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant