[Ur] C FFI and openssl
Todd Roth
toddjroth at gmail.com
Mon Jul 27 10:27:02 EDT 2015
Thanks Benjamin. Your library looks perfect for my hashing needs. Hopefully will have some time later today to try it out.
Regards,
Todd
> On Jul 26, 2015, at 6:26 PM, Benjamin Barenblat <bbaren at mit.edu> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> Hi Todd,
>
> I’m a bit rusty on linker syntax, but I _think_ that instead of
>
> gcc […] -lcrypto -lssl […]crypt.o
>
> you want
>
> gcc […]crypt.o […] -lcrypto -lssl
>
> The linker needs to see that crypt.o uses 'SHA256@@OPENSSL_1.0.0' so it
> can pull the appropriate symbol out of libcrypto.so, and it makes only
> one pass from left to right.
>
> As an aside, I’ve written an FFI library [1] which looks like it does
> exactly what you want. Naturally, you’re welcome to use it.
>
> Best,
> Benjamin
>
> [1] https://benjamin.barenblat.name/gitweb/?p=urweb-crypto-hash-openssl.git
> -----BEGIN PGP SIGNATURE-----
>
> iQF8BAEBCgBmBQJVtV6WXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
> ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ5OThCQjVEMTlDOEE3QjE3OUUwREFCODY5
> RTczMDE0OUVCOTFDNTNCAAoJEJ5zAUnrkcU7T3YH/3TDT5CzkcZDGW855a2HoVGz
> zlMe2B64dfMMecNHitW09Pxl49bdUCsVXruH+0hVuapHLRFUMDkfgr0IZgG/aL6j
> +HUZmgJhpbqZ4oi5M3pA64cwg/2qGFBYbLKd3HA0HIoEvFkyEgqk8glWdcdg77hw
> 33+AVguRXKBCgGuI7hnpj5KZXpSoH94lOjD7veKKcPfG7kTa2FoFATp2eDsupxAd
> j7JkfehvTy3IyE2wictoBmojbMdfj6/9Cf4E73fL987GDeLqEjfkEHxi7DxJQZTk
> eNZhoNFSG54OkJx++hNPHi4OGbKxLV+cakrY/H4lqvx/tDrkLlXYi57qmq949no=
> =CWCh
> -----END PGP SIGNATURE-----
More information about the Ur
mailing list