Skip to content

Comments

Add dummy proof keys and discovery XML#86

Open
thomaslevesque wants to merge 1 commit intomicrosoft:mainfrom
thomaslevesque:wopi-proof
Open

Add dummy proof keys and discovery XML#86
thomaslevesque wants to merge 1 commit intomicrosoft:mainfrom
thomaslevesque:wopi-proof

Conversation

@thomaslevesque
Copy link
Contributor

Fixes #22

Currently there's just a proof-keys.xml file with dummy keys, and a discovery.xml file with the corresponding public keys. In a future evolution, it might be useful to add an option to specify the proof keys file, but then the discover file would need to be updated to match the specified keys.

@tylerbutler
Copy link
Member

@thomaslevesque Thanks for the PR! Could you share the cert that you used and the process used to generate it?

@thomaslevesque
Copy link
Contributor Author

Hi @tylerbutler,

I didn't use a certificate, I just made a new RSACryptoServiceProvider and used ExportCspBlob(true) to get the private key and ExportCspBlob(false) to get the public key.
You can recreate the same keys from the proof-keys.xml file, using ImportCspBlob (which is what the code is doing)

@thomaslevesque
Copy link
Contributor Author

thomaslevesque commented Jan 24, 2020

and ExportCspBlob(false) to get the public key.

Actually, that's not quite right. This only gives the value for the public key in the discovery document. For the exponent and modulus, I used ExportParameters(false) and used the Exponent and Modulus properties of the result.

@thomaslevesque
Copy link
Contributor Author

If requested, I can add a small program to generate the keys (and maybe rotate them)

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 this pull request may close these issues.

Determine the fate of the proof key tests

2 participants