Fix doc links
This commit is contained in:
parent
404a753921
commit
3de1385660
|
|
@ -51,7 +51,6 @@ impl<'a> Deriver<'a> {
|
|||
///
|
||||
/// It can be used to size the buffer passed to [`Deriver::derive`].
|
||||
#[corresponds(EVP_PKEY_derive)]
|
||||
/// [`EVP_PKEY_derive`]: https://www.openssl.org/docs/man1.0.2/crypto/EVP_PKEY_derive_init.html
|
||||
pub fn len(&mut self) -> Result<usize, ErrorStack> {
|
||||
unsafe {
|
||||
let mut len = 0;
|
||||
|
|
|
|||
|
|
@ -413,7 +413,6 @@ impl Rsa<Public> {
|
|||
/// `n` is the modulus common to both public and private key.
|
||||
/// `e` is the public exponent.
|
||||
#[corresponds(RSA_new)]
|
||||
/// [`RSA_set0_key`]: https://www.openssl.org/docs/man1.1.0/crypto/RSA_set0_key.html
|
||||
pub fn from_public_components(n: BigNum, e: BigNum) -> Result<Rsa<Public>, ErrorStack> {
|
||||
unsafe {
|
||||
let rsa = cvt_p(ffi::RSA_new())?;
|
||||
|
|
@ -472,7 +471,6 @@ impl RsaPrivateKeyBuilder {
|
|||
/// `n` is the modulus common to both public and private key.
|
||||
/// `e` is the public exponent and `d` is the private exponent.
|
||||
#[corresponds(RSA_new)]
|
||||
/// [`RSA_set0_key`]: https://www.openssl.org/docs/man1.1.0/crypto/RSA_set0_key.html
|
||||
pub fn new(n: BigNum, e: BigNum, d: BigNum) -> Result<RsaPrivateKeyBuilder, ErrorStack> {
|
||||
unsafe {
|
||||
let rsa = cvt_p(ffi::RSA_new())?;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use std::pin::Pin;
|
|||
use std::sync::LazyLock;
|
||||
use std::task::{ready, Context, Poll, Waker};
|
||||
|
||||
/// The type of futures to pass to [`SslContextBuilderExt::set_async_select_certificate_callback`].
|
||||
/// The type of futures to pass to [`SslContextBuilder::set_async_select_certificate_callback`].
|
||||
pub type BoxSelectCertFuture = ExDataFuture<Result<BoxSelectCertFinish, AsyncSelectCertError>>;
|
||||
|
||||
/// The type of callbacks returned by [`BoxSelectCertFuture`] methods.
|
||||
|
|
@ -25,19 +25,19 @@ pub type BoxPrivateKeyMethodFuture =
|
|||
pub type BoxPrivateKeyMethodFinish =
|
||||
Box<dyn FnOnce(&mut SslRef, &mut [u8]) -> Result<usize, AsyncPrivateKeyMethodError>>;
|
||||
|
||||
/// The type of futures to pass to [`SslContextBuilderExt::set_async_get_session_callback`].
|
||||
/// The type of futures to pass to [`SslContextBuilder::set_async_get_session_callback`].
|
||||
pub type BoxGetSessionFuture = ExDataFuture<Option<BoxGetSessionFinish>>;
|
||||
|
||||
/// The type of callbacks returned by [`BoxSelectCertFuture`] methods.
|
||||
pub type BoxGetSessionFinish = Box<dyn FnOnce(&mut SslRef, &[u8]) -> Option<SslSession>>;
|
||||
|
||||
/// The type of futures to pass to [`SslContextBuilderExt::set_async_custom_verify_callback`].
|
||||
/// The type of futures to pass to [`SslContextBuilder::set_async_custom_verify_callback`].
|
||||
pub type BoxCustomVerifyFuture = ExDataFuture<Result<BoxCustomVerifyFinish, SslAlert>>;
|
||||
|
||||
/// The type of callbacks returned by [`BoxCustomVerifyFuture`] methods.
|
||||
pub type BoxCustomVerifyFinish = Box<dyn FnOnce(&mut SslRef) -> Result<(), SslAlert>>;
|
||||
|
||||
/// Convenience alias for futures stored in [`Ssl`] ex data by [`SslContextBuilderExt`] methods.
|
||||
/// Convenience alias for futures stored in [`Ssl`] ex data by [`SslContextBuilder`] methods.
|
||||
///
|
||||
/// Public for documentation purposes.
|
||||
pub type ExDataFuture<T> = Pin<Box<dyn Future<Output = T> + Send>>;
|
||||
|
|
@ -123,7 +123,7 @@ impl SslContextBuilder {
|
|||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// The returned [`SslSession`] must not be associated with a different [`SslContext`].
|
||||
/// The returned [`SslSession`] must not be associated with a different [`SslContextBuilder`].
|
||||
pub unsafe fn set_async_get_session_callback<F>(&mut self, callback: F)
|
||||
where
|
||||
F: Fn(&mut SslRef, &[u8]) -> Option<BoxGetSessionFuture> + Send + Sync + 'static,
|
||||
|
|
|
|||
|
|
@ -167,11 +167,10 @@ impl X509StoreContextRef {
|
|||
/// * `cert_chain` - The certificates chain.
|
||||
/// * `with_context` - The closure that is called with the initialized context.
|
||||
///
|
||||
/// This corresponds to [`X509_STORE_CTX_init`] before calling `with_context` and to
|
||||
/// [`X509_STORE_CTX_cleanup`] after calling `with_context`.
|
||||
/// Calls [`X509_STORE_CTX_cleanup`] after calling `with_context`.
|
||||
///
|
||||
/// [`X509_STORE_CTX_init`]: https://www.openssl.org/docs/man1.0.2/crypto/X509_STORE_CTX_init.html
|
||||
/// [`X509_STORE_CTX_cleanup`]: https://www.openssl.org/docs/man1.0.2/crypto/X509_STORE_CTX_cleanup.html
|
||||
#[corresponds(X509_STORE_CTX_init)]
|
||||
pub fn init<F, T>(
|
||||
&mut self,
|
||||
trust: &store::X509StoreRef,
|
||||
|
|
@ -1287,10 +1286,7 @@ pub struct X509ReqBuilder(X509Req);
|
|||
|
||||
impl X509ReqBuilder {
|
||||
/// Returns a builder for a certificate request.
|
||||
///
|
||||
/// This corresponds to [`X509_REQ_new`].
|
||||
///
|
||||
///[`X509_REQ_new`]: https://www.openssl.org/docs/man1.1.0/crypto/X509_REQ_new.html
|
||||
#[corresponds(X509_REQ_new)]
|
||||
pub fn new() -> Result<X509ReqBuilder, ErrorStack> {
|
||||
unsafe {
|
||||
ffi::init();
|
||||
|
|
@ -1299,10 +1295,7 @@ impl X509ReqBuilder {
|
|||
}
|
||||
|
||||
/// Set the numerical value of the version field.
|
||||
///
|
||||
/// This corresponds to [`X509_REQ_set_version`].
|
||||
///
|
||||
///[`X509_REQ_set_version`]: https://www.openssl.org/docs/man1.1.0/crypto/X509_REQ_set_version.html
|
||||
#[corresponds(X509_REQ_set_version)]
|
||||
pub fn set_version(&mut self, version: i32) -> Result<(), ErrorStack> {
|
||||
unsafe { cvt(ffi::X509_REQ_set_version(self.0.as_ptr(), version.into())).map(|_| ()) }
|
||||
}
|
||||
|
|
@ -1460,10 +1453,7 @@ impl X509ReqRef {
|
|||
}
|
||||
|
||||
/// Returns the public key of the certificate request.
|
||||
///
|
||||
/// This corresponds to [`X509_REQ_get_pubkey"]
|
||||
///
|
||||
/// [`X509_REQ_get_pubkey`]: https://www.openssl.org/docs/man1.1.0/crypto/X509_REQ_get_pubkey.html
|
||||
#[corresponds(X509_REQ_get_pubkey)]
|
||||
pub fn public_key(&self) -> Result<PKey<Public>, ErrorStack> {
|
||||
unsafe {
|
||||
let key = cvt_p(ffi::X509_REQ_get_pubkey(self.as_ptr()))?;
|
||||
|
|
@ -1474,10 +1464,7 @@ impl X509ReqRef {
|
|||
/// Check if the certificate request is signed using the given public key.
|
||||
///
|
||||
/// Returns `true` if verification succeeds.
|
||||
///
|
||||
/// This corresponds to [`X509_REQ_verify"].
|
||||
///
|
||||
/// [`X509_REQ_verify`]: https://www.openssl.org/docs/man1.1.0/crypto/X509_REQ_verify.html
|
||||
#[corresponds(X509_REQ_verify)]
|
||||
pub fn verify<T>(&self, key: &PKeyRef<T>) -> Result<bool, ErrorStack>
|
||||
where
|
||||
T: HasPublic,
|
||||
|
|
@ -1486,8 +1473,7 @@ impl X509ReqRef {
|
|||
}
|
||||
|
||||
/// Returns the extensions of the certificate request.
|
||||
///
|
||||
/// This corresponds to [`X509_REQ_get_extensions"]
|
||||
#[corresponds(X509_REQ_get_extensions)]
|
||||
pub fn extensions(&self) -> Result<Stack<X509Extension>, ErrorStack> {
|
||||
unsafe {
|
||||
let extensions = cvt_p(ffi::X509_REQ_get_extensions(self.as_ptr()))?;
|
||||
|
|
|
|||
Loading…
Reference in New Issue