koltyakov / gosip

⚡️ SharePoint SDK for Go
https://go.spflow.com
MIT License
140 stars 32 forks source link

Failed to decode pkcs12 certificate issue #60

Closed wildsurfer closed 1 year ago

wildsurfer commented 1 year ago

Describe the bug /auth/azurecert/Create-SelfSignedCertificate.sh script generates certificate that isn't working. After running the app made form example code in README.md I'm getting the error message:

unable to request api: failed to get oauth token from certificate auth: failed to decode pkcs12 certificate while creating spt: pkcs12: unknown digest algorithm: 2.16.840.1.101.3.4.2.1

Versions SharePoint Online gosip@v0.0.0-20230416191329-2fa7a7295870

To Reproduce Copy the code from README.md. Change auth strategy to azurecert. Generate certificate by using the /auth/azurecert/Create-SelfSignedCertificate.sh script

Expected behavior App should connect to the SharePoint API

koltyakov commented 1 year ago

Thank you for finding and fixing the issue!