Marco Huenseler
14b5439347
Rename X509NameRef::all_entries and refactor end-of-iterator checks
2018-06-03 15:38:46 +02:00
Marco Huenseler
f5e6d57c47
Provide an Asn1Object getter method for X509NameEntryRef
2018-06-03 15:38:46 +02:00
Marco Huenseler
2afdc16fc9
Make X509NameRef provide an iterator over all X509NameEntries
2018-06-03 15:38:46 +02:00
Steven Fackler
a774c0c5f2
Rename X509Ref::fingerprint to X509Ref::digest and avoid allocating
2018-05-24 21:07:36 -07:00
Steven Fackler
d991566f2b
Support min/max version in LibreSSL
...
Their implementations of the accessors don't behave expected with no
bounds, so we ignore those bits of the tests.
2018-05-19 19:57:12 -07:00
René Richter
5bb89d7552
Add functions to X509Req to obtain public key and extensions
...
This allows for basic CSR signing.
2018-04-21 23:14:48 +02:00
Steven Fackler
c82a87a18e
Add Asn1IntegerRef::to_bn
...
Also deprecate Asn1IntegerRef since it's just asking for trouble.
2018-03-28 20:48:28 +02:00
Steven Fackler
4ee7e0d3a9
Tweak verify_cert's signature
...
The call can fail either due to an invalid cert or an internal error,
and we should distinguish between the two.
2018-03-11 14:08:34 -07:00
Bastian Köcher
d7a7c379a8
Changes `init` to take a closure which is called with the initialized context
...
After calling the closure, we automatically cleanup the context. This is
required, because otherwise we could have dangling references in the context.
2018-03-11 11:34:36 +01:00
Bastian Köcher
a5d7f8a718
Moves store context init into its own function
2018-03-10 00:15:03 +01:00
Bastian Köcher
1a0b085377
Extends the test to verify the certificate two times
2018-03-08 12:10:29 +01:00
Bastian Köcher
888f4ccaab
Fixes the implementation of `X509StoreContextRef::verify_cert`
...
The certificate, the store and the certificates chain does not need to be
consumed by `verify_cert` and instead are taken as references. We also call
`X509_STORE_CTX_cleanup`, after the verification succeeded.
2018-03-07 16:07:57 +01:00
Benjamin Fry
6abac82f13
cleanup and add negative test
2018-03-07 13:54:35 +01:00
Benjamin Fry
a1cfde765a
add cleanup ffi to store context
2018-03-07 13:54:15 +01:00
Benjamin Fry
3187366cc5
restructure to self contained function
2018-03-07 13:53:29 +01:00
Benjamin Fry
d8a11973e2
convert to raw pass-through methods
2018-03-07 13:51:58 +01:00
Benjamin Fry
35cad33d51
fix error check
2018-03-07 13:50:12 +01:00
Benjamin Fry
847fac25f8
properly version library functions
2018-03-07 13:48:09 +01:00
Benjamin Fry
3595ff9e51
Fix memory mgmt
2018-03-07 13:42:39 +01:00
Benjamin Fry
eb6296e892
add verify_cert and store_context_builder
2018-03-07 13:41:44 +01:00
Ian P. Cooke
60337266ab
add support for rfc822Name (email) and uniformResourceIdentifier (uri) to GeneralName
2018-01-15 11:22:29 -06:00
Bastien Orivel
bb5ab2b43f
Bump hex to 0.3
...
The `to_hex` method has been removed and `hex::encode` should be used
instead.
2018-01-01 17:38:38 +01:00
Steven Fackler
d207897458
Parameterize keys over what they contain
...
Closes #790
2017-12-30 21:53:39 -08:00
Steven Fackler
129b6b9d84
Overhaul verify error type
...
Also set the error in the hostname verification callback for 1.0.1
2017-12-26 14:43:10 -07:00
Steven Fackler
2adf2cf12b
Remove deprecated APIs
2017-12-25 22:09:27 -07:00
Steven Fackler
3eab162dc2
Move to associated consts
2017-12-25 19:56:27 -07:00
Steven Fackler
bbae793eb3
Upgrade bitflags to 1.0
...
Closes #756
2017-12-25 19:38:11 -07:00
Steven Fackler
7de1499c65
Fix X509::clone impl
...
Closes #667
2017-07-19 19:23:47 -07:00
Steven Fackler
bcd0dcafcb
Rustfmt
2017-07-15 21:46:11 -07:00
Steven Fackler
f2c69ae7e9
Merge remote-tracking branch 'origin/master' into x509-builder
2017-02-11 10:13:00 -08:00
Steven Fackler
1c25336520
Merge branch 'master' into x509_req_version_subject
2017-02-11 09:11:25 -08:00
Steven Fackler
03fe3015dc
X509 signature algorithm access
2017-02-10 21:37:33 -08:00
Steven Fackler
8e5735d84c
X509 signature access
2017-02-10 19:59:11 -08:00
mredlek
557b936e27
Added X509ReqRef.subject_name and X509ReqRef.version
2017-01-26 21:05:33 +01:00
Steven Fackler
54900976bb
Support EC_GROUP_set_asn1_flag
...
Closes #561
2017-01-22 10:44:59 +00:00
Steven Fackler
920ab0d6fb
OCSP functionality
2017-01-14 21:09:38 -08:00
Steven Fackler
6291407b17
Add X509::stack_from_pem
...
Implementation is a clone of SSL_CTX_use_certificate_chain_file
2017-01-03 14:56:00 -08:00
Steven Fackler
a42c6e8713
Drop rustc-serialize dependency
2016-11-09 20:35:23 +00:00
Steven Fackler
d78acc729b
Add an X509ReqBuilder
2016-11-07 20:42:43 +00:00
Steven Fackler
8f7df7b205
Add SubjectAlternativeName
2016-11-06 23:19:58 -08:00
Steven Fackler
d17c3355ab
More extension progress
2016-11-06 22:52:53 -08:00
Steven Fackler
5f18ffa4b3
Start of extension support
2016-11-06 21:58:43 -08:00
Steven Fackler
b83edbad0d
Start on an X509Builder
2016-11-06 14:07:34 -08:00
Lionel Flandrin
36bf0bb387
Replace GeneralNames by the new Stack API
2016-11-01 21:23:18 +01:00
Steven Fackler
dc4098bdd8
Clean up x509 name entries
2016-10-31 22:43:05 -07:00
Steven Fackler
f75f82e466
Rustfmt
2016-10-30 16:37:45 -07:00
Steven Fackler
787cad3c82
Use constants rather than constructors for Nid
2016-10-22 15:58:06 -07:00
Steven Fackler
3c50c74444
Camel case Rsa
2016-10-22 10:21:16 -07:00
Steven Fackler
2fd201d9c3
De-enumify Nid
2016-10-22 10:08:32 -07:00
Steven Fackler
98b7f2f935
Flatten crypto module
2016-10-22 09:16:38 -07:00