|
|
|
@ -179,18 +179,27 @@ int verifier_verifymsg(char *buffer) { |
|
|
|
|
|
|
|
if (has_nym) { |
|
|
|
sig_len = ecdaa_signature_FP256BN_with_nym_length(); |
|
|
|
#ifdef DEBUG |
|
|
|
printf("verifier_verifymsg: nym detected, signature length = %ld.\n",sig_len); |
|
|
|
#endif |
|
|
|
} else { |
|
|
|
sig_len = ecdaa_signature_FP256BN_length(); |
|
|
|
} |
|
|
|
|
|
|
|
bzero(binbuf, MAX_BUFSIZE); |
|
|
|
ecdaa_decode(current, binbuf, sig_len); |
|
|
|
#ifdef DEBUG |
|
|
|
printf("verifier_verifymsg: Signature decoded.\n"); |
|
|
|
#endif |
|
|
|
|
|
|
|
ret = ecdaa_signature_FP256BN_deserialize(&sig, binbuf, has_nym); |
|
|
|
if (0 != ret) { |
|
|
|
printf("verifier_verifymsg: error reading signature.\n"); |
|
|
|
return -1; |
|
|
|
} |
|
|
|
#ifdef DEBUG |
|
|
|
printf("verifier_verifymsg: Signature deserialized.\n"); |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
printf("verifier_verifymsg: has_nym: %u, sig_len: %lu\n", has_nym, sig_len); |
|
|
|
|