First, thanks for the help so far. To follow up on this, I think there is some kind of error in the documentation. I just want to clarify that I am doing this right.
I am using:
wolfSSL User Manual
March 11, 2013
Version 2.5.1
On page 79/80 under the section: 10.5.4 DSA (Digital Signature Algorithm)
In the example, there is no "tmp" variable defined. However, it is used.
Looking at the function call:
ShaUpdate(&sha, tmp, message);
I'm pretty sure is wrong, as you are passing message, which is byte *, to the word32 length part of the function.
I assume that the tmp variable should be gotten rid of, and replaced with message. And the function call should look like
ShaUpdate(&sha, message, sizeof(message));
And then this would propagate down to:
DsaPrivateKeyDecode(message, &idx, &key, dsaKeyBuffer);
Am I correct?