|
|
@ -70,6 +70,7 @@ int32_t signed_nn_recv(void **freeptrp,void *ctx,uint8_t notaries[64][33],int32_ |
|
|
|
{ |
|
|
|
*(void **)packetp = (void **)((uint64_t)sigpacket + sizeof(*sigpacket)); |
|
|
|
*freeptrp = sigpacket; |
|
|
|
printf("got signed packet from notary0\n"); |
|
|
|
return((int32_t)(recvbytes - sizeof(*sigpacket))); |
|
|
|
} |
|
|
|
for (i=0; i<n && i<64; i++) |
|
|
@ -77,7 +78,7 @@ int32_t signed_nn_recv(void **freeptrp,void *ctx,uint8_t notaries[64][33],int32_ |
|
|
|
if ( memcmp(pubkey33,notaries[i],33) == 0 ) |
|
|
|
{ |
|
|
|
*(void **)packetp = (void **)((uint64_t)sigpacket + sizeof(*sigpacket)); |
|
|
|
//printf("got signed packet from notary.%d\n",i);
|
|
|
|
printf("got signed packet from notary.%d\n",i); |
|
|
|
*freeptrp = sigpacket; |
|
|
|
return((int32_t)(recvbytes - sizeof(*sigpacket))); |
|
|
|
} |
|
|
@ -89,9 +90,9 @@ int32_t signed_nn_recv(void **freeptrp,void *ctx,uint8_t notaries[64][33],int32_ |
|
|
|
printf(" pubkey[%d]\n",i); |
|
|
|
} |
|
|
|
} |
|
|
|
for (i=0; i<33; i++) |
|
|
|
printf("%02x",pubkey33[i]); |
|
|
|
printf(" invalid pubkey33 n.%d\n",n); |
|
|
|
//for (i=0; i<33; i++)
|
|
|
|
// printf("%02x",pubkey33[i]);
|
|
|
|
//printf(" invalid pubkey33 n.%d\n",n);
|
|
|
|
} else printf("recoververify error nonce.%u packetlen.%d\n",sigpacket->nonce,sigpacket->packetlen); |
|
|
|
} else printf("hash mismatch or bad nonce.%u packetlen.%d\n",sigpacket->nonce,sigpacket->packetlen); |
|
|
|
} //else printf("recvbytes.%d mismatched packetlen.%d + %ld\n",recvbytes,sigpacket!=0?sigpacket->packetlen:-1,sizeof(*sigpacket));
|
|
|
|