Kevin King
fa5537de81
copy PKey using DER encode and decode
...
test that fields of cloned private and public keys can be accessed
2016-04-10 00:16:31 -04:00
Kevin King
4016edd4de
add EVP_PKEY_copy_parameters to FFI
...
copy EVP_PKEY params in PKey::clone
test that PKey::clone creates a copy
2016-04-06 19:39:50 -04: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
627f394d59
Revert "Revert "impl Clone for PKey and X509 by using their 'references' member""
2016-01-31 20:38:36 +00: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
8ab4b54541
Revert "impl Clone for PKey and X509 by using their 'references' member"
2016-01-28 23:37:27 -08:00
Daniel Albert
74db7db560
Merge branch 'master' of https://github.com/sfackler/rust-openssl
2016-01-20 19:59:41 +00:00
Cody P Schafer
3c51f159a7
crypto/pkey: impl Clone for PKey using openssl's ref counting
2016-01-19 22:04:51 -05:00
Steven Fackler
b32a50797c
Merge pull request #328 from Cyberunner23/PemRSA
...
Add support for RSA PEM files.
2016-01-09 13:08:00 -08:00
Cyberunner23
c0b9a4c8ec
Added tests for private_rsa_key_from_pem() and public_rsa_key_from_pem()
2016-01-09 14:36:01 -05:00
Will Tange
89e88727ff
Mark PKey as `Send` and `Sync`
...
Provided that the locking function is set, the underlying `ffi::EVP_KEY`
type should be safe to use across threads.
2016-01-07 06:33:25 +01:00
Cyberunner23
1d3277fbee
Added private_rsa_key_from_pem and public_rsa_key_from_pem.
2016-01-05 13:22:56 -05:00
Daniel Albert
5813ca371d
Add RSA structs
2016-01-01 19:33:49 +00:00
Steven Fackler
157e6aa961
Rustfmt
2015-12-15 21:51:20 -08:00
Overmind JIANG
3c6c4a7b3d
Fix a leak when using `EVP_PKEY_get1_RSA`.
...
`EVP_PKEY_get1_RSA` returns a RSA structure with its reference count
increased by 1 and therefore we need to call `RSA_free` after finishing
using that value.
2015-11-18 11:36:34 +08:00
Thom May
11e3b1b563
Provide public_decrypt, private_encrypt for PKEY
2015-10-28 18:15:55 +00:00
Nathan Lilienthal
ffa9d330fd
Add public key PEM read function.
2015-10-01 20:33:12 -04:00
Steven Fackler
f4bf55faa3
Merge pull request #270 from mvdnes/crypto_segv
...
Check if public/private RSA key is properly loaded
2015-09-11 11:31:15 -04:00
Mathijs van de Nes
87d5c0e429
Fix one call to RSA_size found by tests
2015-09-11 09:24:24 +02:00
Mathijs van de Nes
3be32528e5
Add tests to ensure a panic occurs instead of segv
2015-09-11 09:23:51 +02:00
Mathijs van de Nes
0eb2f0ecfa
Check rsa.is_null() before passing it to RSA_size
...
RSA_size will cause an segmentation fault if it is null
2015-09-10 13:04:25 +02:00
Mathijs van de Nes
02b109bf04
Check _fromstr function for success
2015-09-10 12:58:40 +02:00
Alex Gaynor
4781a3304a
Make the docs say that load_pub/save_pub methods take DER bytes
2015-09-09 19:58:45 -04:00
Andrew Dunham
ab7bfad225
Add function to write RSA public key as PEM
2015-07-23 22:30:07 -07:00
Emeric Chevalier
7320c1619f
Correction on sign and verify documentation to be more explicit of right
...
behaviour (no hash done by the functions).
2015-05-30 13:08:45 +02:00
Manuel Schölling
b0bcb44556
Move PKey comparison func to public_eq()
2015-05-01 10:58:15 +02:00
Manuel Schölling
123d400277
Add comparison for PKeys
2015-04-16 17:14:21 +02:00
Manuel Schölling
7db00b97ba
Add X509::public_key()
2015-04-15 22:59:07 +02:00
Manuel Schölling
b6c5c113f5
Add SslContext::add_extra_chain_cert()
2015-04-03 14:34:24 +02:00
Manuel Schölling
632d8398cf
Add ability to load private keys from files and use raw keys and certificates for SslContext
2015-04-03 14:34:24 +02:00
Alex Crichton
293f1ce5b1
Fixup for beta
...
Add derive(Clone) and don't negate unsigned numbers
2015-04-02 18:14:51 -07:00
Steven Fackler
36c90bb205
Fix deprecation warnings
2015-03-25 21:50:21 -07:00
Steven Fackler
6991cc6a30
Convert to new IO.
2015-02-24 23:01:57 -08:00
Steven Fackler
ec65b0c67b
Move docs to this repo and auto build
2015-02-07 21:30:05 -08:00