Peter Stuge <[email protected]> writes:

> Kamil Dudka wrote:
>> > Hm, this is how it looked before my patch. Do you know what is
>> > up with that tmp[0] == '\0' thing?
>> 
>> Not exactly. Maybe the RFC knows, but as you see I am afraid to
>> open it ;-)
>
> It's somehow part of the libgcrypt API. Simon, can you help us? After
> a DSA signature which returns 2x 20-byte integers, why does
> gcry_sexp_nth_data() return 21 bytes of data?

I think it wants to make sure the data is a valid (positive)
S-expression.

> Would it be possible/good to use gcry_mpi_print() instead, with the
> GCRYMPI_FMT_STD format?

The data returned from libgcrypt are S-expressions, so maybe the safest
would be to use gcry_sexp_nth_mpi and then print the mpi as you suggest.
On the other hand, maybe you could just figure out how to go from the 21
bytes padded data to the 20 byte data -- it should be simple.

No time to fix this right now though, so I hope you can fix it!

Thanks,
/Simon
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to