Commit Graph

37 Commits

Author SHA1 Message Date
Steven Fackler 5e6b8e68fd More API cleanup 2016-08-10 21:07:41 -07:00
Steven Fackler c4e7743c57 Asn1 and Bignum renames 2016-08-10 20:51:06 -07:00
Steven Fackler e4b97921a9 Clean up RSA and DSA accessors 2016-08-08 19:04:30 -07:00
Steven Fackler deb94a904b Fix build on 1.9 2016-08-07 22:58:20 -07:00
Steven Fackler 2a3e9a2856 Add RSA::generate 2016-08-07 22:35:37 -07:00
Steven Fackler 7515272692 Fix RSA::verify
It never returns -1 - all errors are indicated by 0
2016-08-07 18:03:13 -07:00
Steven Fackler 7ca5ccf064 Hash reform
Closes #430
2016-08-07 16:29:36 -07:00
Steven Fackler 05089bacb3 Refactor BigNum 2016-08-07 14:33:18 -07:00
Steven Fackler bc97d088b0 get_handle -> handle 2016-08-05 21:07:17 -07:00
Steven Fackler 08e27f31ed Restructure PEM input/output methods
Dealing with byte buffers directly avoids error handling weirdness and
we were loading it all into memory before anyway.
2016-08-02 20:49:28 -07:00
Steven Fackler f1b64aa2ee Fix weird inference issue on 1.9 2016-07-31 16:04:03 -07:00
Steven Fackler e86eb68624 Fix catch_unwind feature and drop feature gate 2016-07-31 15:51:22 -07:00
Steven Fackler f0ffa246b8 Merge remote-tracking branch 'origin/master' into breaks 2016-07-31 15:15:47 -07:00
Ben Batha 67d3067dbf improve error handling in rsa 2016-07-29 20:01:54 -04:00
Jonas Schievink f24ab26936 FnMut -> FnOnce, update docs 2016-06-26 19:44:53 +02:00
Jonas Schievink 351bc569a4 Put the test behind the catch_unwind feature
And fix an unused variable warning
2016-06-26 18:25:54 +02:00
Jonas Schievink d176ea1c6e Add an RSA key decryption test 2016-06-26 18:25:54 +02:00
Jonas Schievink 41b78547ad Put password callbacks behind a cargo feature 2016-06-26 18:25:54 +02:00
Jonas Schievink c1b7cd2420 Make the callback take a `&mut [c_char]` 2016-06-26 18:25:54 +02:00
Jonas Schievink c399c2475d Add RSA::private_key_from_pem_cb 2016-06-26 18:25:54 +02:00
Steven Fackler 1b0757409d Rustfmt 2016-05-16 23:03:13 -07:00
Steven Fackler 2077449bc8 Clean up RSA signature API 2016-05-16 23:03:13 -07:00
Chris Dawes f82a1c4f75 add rsa signature tests 2016-05-05 23:41:55 +01:00
Chris Dawes a5ede6a851 add missing NIDs and use Nid as input to signing 2016-05-04 09:00:05 +01:00
Steven Fackler fa62232649 Error reform 2016-05-03 20:24:07 -07:00
Chris Dawes 6f410a25b2 take enum instead of ints from openssl header file 2016-05-03 22:17:07 +01:00
Chris Dawes 6bbb21779b add constructor for private keys from bignums 2016-05-03 19:46:08 +01:00
Benjamin Fry 3e5b65b7fa making from_raw() unsafe 2016-03-05 13:43:14 -08:00
Benjamin Fry 3fb2c48c98 added public key material to the constructor 2016-02-28 22:05:19 -08:00
Benjamin Fry 6ebe581308 review fixes, keep raw RSA initiallization private 2016-02-23 20:49:21 -08:00
Benjamin Fry ef95223d26 adding functionality to directly get and set RSA key material 2016-02-17 23:18:42 -08:00
Steven Fackler 4e58fd10de Fix PKey RSA constructors
`set1` functions bump the object's refcount so we were previously
leaking the RSA object. Split the decode from PEM part out to a method
on RSA and use that in the PKey constructors.

Also make RSA a pointer and actually free it.
2016-01-30 13:12:06 -08:00
Steven Fackler 7610804c9d Remove unwraps from rsa accessors 2016-01-22 19:10:22 -08:00
Daniel Albert 3ee2bf9310 Fix up RSA integration 2016-01-20 20:29:06 +00:00
Daniel Albert 1f45723b39 Fix incorrect unsafe declaration 2016-01-12 20:57:01 +00:00
Daniel Albert 7e8df9febd Adhere to rust conventions 2016-01-12 18:15:07 +00:00
Daniel Albert 578fac7e80 Add public interface to access BigNums from RSA keys 2016-01-01 19:46:03 +00:00