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

Wrong cert data inserted in the metadata files by the Get-SPIDMetadatas PS script #34

Closed
vifani opened this issue Jul 18, 2022 · 1 comment · Fixed by #35
Closed

Wrong cert data inserted in the metadata files by the Get-SPIDMetadatas PS script #34

vifani opened this issue Jul 18, 2022 · 1 comment · Fixed by #35

Comments

@vifani
Copy link
Contributor

vifani commented Jul 18, 2022

The Get-SPIDMetadatas PS script use the following code to load the certificate:
$cert = (New-Object System.IO.StreamReader($certificateFilePath)).ReadToEnd()
This code considers that the certificate file contains the plain certificate in base64. Unfortunately usually .cer file format is defined as follow
-----BEGIN CERTIFICATE----- <base64 certificate> -----END CERTIFICATE-----
So, at current time, the PS script generates the XML metadata as follows
<md:KeyDescriptor use="signing"> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:X509Data> <ds:X509Certificate>-----BEGIN CERTIFICATE----- ..... -----END CERTIFICATE----- </ds:X509Certificate>
This is a not valid certificate data inside the XML metadata

@fume
Copy link
Collaborator

fume commented Sep 14, 2022

@PaoloCastAway , can you give it a look? That would be great if the script could handle correctly both cert format

@fume fume linked a pull request Sep 16, 2022 that will close this issue
fume added a commit to vifani/SPID-and-Digital-Identity-Enabler that referenced this issue Sep 16, 2022
@fume fume closed this as completed in #35 Sep 16, 2022
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

Successfully merging a pull request may close this issue.

2 participants