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

signatureKey will not be decoded correctly #259

Open
tantalate opened this issue Sep 17, 2018 · 4 comments
Open

signatureKey will not be decoded correctly #259

tantalate opened this issue Sep 17, 2018 · 4 comments
Labels
topic: documentation Related to documentation for the project

Comments

@tantalate
Copy link

I am assigning signatureKey as one-line string with \n replacing all line breaks, but the \n is read as \\n in the signatureKey string, and thus pem.Decode([]byte(*signatureKey)) would failed to decode the key.
How should I assign the signatureKey?

@facchinm
Copy link
Member

@tantalate this is quite strange since it used to work exactly as you describe (like here #149 (comment)). @matteosuppo any idea?

@tantalate
Copy link
Author

@tantalate this is quite strange since it used to work exactly as you describe (like here #149 (comment)). @matteosuppo any idea?

Yes, it used to work in 1.1.71, but not working in 1.1.76.

I think it might be introduced by updates of go-ini/ini package.

I have tried to split the key into multiple lines and enclose it in back quotes and it worked.

Thank you!

@facchinm
Copy link
Member

Great! Would you mind adding an example of the config for future reference? And sorry for the regression, we'll notify third party users (OpenRoberta for example) about this.

@tantalate
Copy link
Author

The signatureKey could be set like this:

signatureKey = `-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAty9EIVIY666Wxst7npCA
vPAqAjjbSNNk8b3Bkzfs1jtkGYAhXTSI7Cg9oCiuZWXbhAL9+Q9riWxOSZ5r3O1E
FAVfEIrMFByBSBjyOggUKu/v8XbdWrNHhe4Y6XeJ0cnAygeqL/130szEEbBB3yj+
AJr+UMLRhBy6Cz7fWBfXaBE0NMLHnlC/yQJsf+PsLclFs2Tqvdq7mL8keZHZGI5p
0dCjo26RDj+XeT+R/Wmo/rf77stCOcKhdc1pRB9blZkQVemisxN0aX1O4IldkP5A
iruAyPN3WW06hobsIcGVrPZAznSdsTvlMnrRgJrND0Zut6ZjiqujJxy7AVaRiOr1
FQIDAQAB
-----END PUBLIC KEY-----`

@umbynos umbynos added the topic: documentation Related to documentation for the project label Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project
Projects
None yet
Development

No branches or pull requests

4 participants