Skip to content

binary sketch uploading POST request #149

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

Closed
elhele opened this issue May 3, 2017 · 2 comments
Closed

binary sketch uploading POST request #149

elhele opened this issue May 3, 2017 · 2 comments

Comments

@elhele
Copy link

elhele commented May 3, 2017

Hello,

I was trying to test an example of the POST request that you provide using Firefox REST client, but I got a message that the signature is wrong. Should I have generated another one? I don't have the private key to generate the signature. Or should I create a key pair by myself, sign the string and manually change the public key in the main.go of the program? In README it is said that "public key contained in the config.ini", but I don't see any key there and also in conn.go it seems that they key is taken not from the config.ini, but from a variable signatureKey in main.go (but here I can be wrong -- I'm not really familiar with go).

The thing is that we are thinking about using the plugin in our project (https://lab.open-roberta.org/) for uploading the programs to Arduino and for this I need to understand how to generate the correct call.

Thank you in advance,
Evgeniya

@elhele elhele closed this as completed May 16, 2017
@facchinm
Copy link
Member

Hi @elhele ,
sorry for the late response but I totally missed this issue 🙂
In go, all variables marked as flag.* are evaluated by flag.Parse() , even if not explicitely stated.
Adding an entry on config.ini with signatureKey = -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9... should do the trick

@elhele
Copy link
Author

elhele commented May 18, 2017

Hello. Thank you very much for the reply, I've already got it, I just used a wrong encoding for signing :)
Now it seems to be working fine and we've almost integrated it into our project, probably it'll be included into the next release.

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

No branches or pull requests

2 participants