Since people didn't like the previous code, try the following version with
safer memory handling. It still segfaults when using the shared library and
doesn't when using the static one. Replacing the line above with the
commented out line works in both cases (since we're no longer relying on
SHA1
Apologies if this is the wrong list. If so, please direct me to the
appropriate one.
Consider the following C code:
include
#include
int main(int argc, char** argv) {
unsigned char foo[10] = "boo";
printf("%s\n", SHA1(foo, 3, 0));
}
in file test-hmac.c.
gcc -static test-hmac.c -lcrypto;
2 matches
Mail list logo