aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ocsp.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-01-06 08:36:35 -0800
committerSteven Fackler <[email protected]>2018-01-06 13:27:44 -0800
commit3c19702299e17554a031b834da1f3c69c8a48e23 (patch)
tree2ba4aaf65e2ad27b60a5f547990b0d16dcfe81e0 /openssl/src/ocsp.rs
parentMerge pull request #811 from apeduru/x509-docs (diff)
downloadrust-openssl-3c19702299e17554a031b834da1f3c69c8a48e23.tar.xz
rust-openssl-3c19702299e17554a031b834da1f3c69c8a48e23.zip
Rename key serialization/deserialization methods
Also document their specific formats. Closes #502
Diffstat (limited to 'openssl/src/ocsp.rs')
-rw-r--r--openssl/src/ocsp.rs42
1 files changed, 38 insertions, 4 deletions
diff --git a/openssl/src/ocsp.rs b/openssl/src/ocsp.rs
index edd51d8f..a1e3d3b2 100644
--- a/openssl/src/ocsp.rs
+++ b/openssl/src/ocsp.rs
@@ -253,11 +253,28 @@ impl OcspResponse {
}
}
- from_der!(OcspResponse, ffi::d2i_OCSP_RESPONSE);
+ from_der! {
+ /// Deserializes a DER-encoded OCSP response.
+ ///
+ /// This corresponds to [`d2i_OCSP_RESPONSE`].
+ ///
+ /// [`d2i_OCSP_RESPONSE`]: https://www.openssl.org/docs/man1.1.0/crypto/d2i_OCSP_RESPONSE.html
+ from_der,
+ OcspResponse,
+ ffi::d2i_OCSP_RESPONSE
+ }
}
impl OcspResponseRef {
- to_der!(ffi::i2d_OCSP_RESPONSE);
+ to_der! {
+ /// Serializes the response to its standard DER encoding.
+ ///
+ /// This corresponds to [`i2d_OCSP_RESPONSE`].
+ ///
+ /// [`i2d_OCSP_RESPONSE`]: https://www.openssl.org/docs/man1.1.0/crypto/i2d_OCSP_RESPONSE.html
+ to_der,
+ ffi::i2d_OCSP_RESPONSE
+ }
/// Returns the status of the response.
pub fn status(&self) -> OcspResponseStatus {
@@ -289,11 +306,28 @@ impl OcspRequest {
}
}
- from_der!(OcspRequest, ffi::d2i_OCSP_REQUEST);
+ from_der! {
+ /// Deserializes a DER-encoded OCSP request.
+ ///
+ /// This corresponds to [`d2i_OCSP_REQUEST`].
+ ///
+ /// [`d2i_OCSP_REQUEST`]: https://www.openssl.org/docs/man1.1.0/crypto/d2i_OCSP_REQUEST.html
+ from_der,
+ OcspRequest,
+ ffi::d2i_OCSP_REQUEST
+ }
}
impl OcspRequestRef {
- to_der!(ffi::i2d_OCSP_REQUEST);
+ to_der! {
+ /// Serializes the request to its standard DER encoding.
+ ///
+ /// This corresponds to [`i2d_OCSP_REQUEST`].
+ ///
+ /// [`i2d_OCSP_REQUEST`]: https://www.openssl.org/docs/man1.1.0/crypto/i2d_OCSP_REQUEST.html
+ to_der,
+ ffi::i2d_OCSP_REQUEST
+ }
pub fn add_id(&mut self, id: OcspCertId) -> Result<&mut OcspOneReqRef, ErrorStack> {
unsafe {