microsoft / Intune-Resource-Access

Sample code and scripts for interfacing with the Intune Resource Access APIs.
MIT License
55 stars 59 forks source link

Add ability to export Public Key in PEM format. #72

Closed mkarasik closed 4 years ago

mkarasik commented 4 years ago

The new optional enum parameter FileFormat is added to Export-IntunePublicKey cmdlet. It accepts the following values CngBlob - default value. The cmdlet will work in the same way as before. aka exporting key as BCRYPT_RSAKEY_BLOB PEM - PEM encoded Public Key

msftclas commented 4 years ago

CLA assistant check
All CLA requirements met.

darba commented 4 years ago

The reservation I have accepting this code change is New-IntuneUserPfxCertificate will fail if someone attempts to use an exported PEM file as the "KeyFilePath". This could cause some confusion for users. I would like KeyFilePath to accept a PEM file for everything to work well.

I looked into it and it is easier to export a PEM than to import one.

There is also a Unit Test compilation failure that needs to be addressed before this can be checked in.