Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update docs.rs links to prefer /latest. #306

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::ops::Deref;

/// An X.509 certificate, as used in rustls.
/// Corresponds to `Certificate` in the Rust API.
/// <https://docs.rs/rustls/0.20.0/rustls/struct.Certificate.html>
/// <https://docs.rs/rustls/latest/rustls/struct.Certificate.html>
pub struct rustls_certificate {
// We use the opaque struct pattern to tell C about our types without
// telling them what's inside.
Expand Down Expand Up @@ -253,7 +253,7 @@ mod tests {
/// The complete chain of certificates to send during a TLS handshake,
/// plus a private key that matches the end-entity (leaf) certificate.
/// Corresponds to `CertifiedKey` in the Rust API.
/// <https://docs.rs/rustls/0.20.0/rustls/sign/struct.CertifiedKey.html>
/// <https://docs.rs/rustls/latest/rustls/sign/struct.CertifiedKey.html>
pub struct rustls_certified_key {
// We use the opaque struct pattern to tell C about our types without
// telling them what's inside.
Expand Down Expand Up @@ -434,7 +434,7 @@ impl rustls_certified_key {
}

/// A root certificate store.
/// <https://docs.rs/rustls/0.20.0/rustls/struct.RootCertStore.html>
/// <https://docs.rs/rustls/latest/rustls/struct.RootCertStore.html>
pub struct rustls_root_cert_store {
// We use the opaque struct pattern to tell C about our types without
// telling them what's inside.
Expand All @@ -452,7 +452,7 @@ impl rustls_root_cert_store {
/// Create a rustls_root_cert_store. Caller owns the memory and must
/// eventually call rustls_root_cert_store_free. The store starts out empty.
/// Caller must add root certificates with rustls_root_cert_store_add_pem.
/// <https://docs.rs/rustls/0.20.0/rustls/struct.RootCertStore.html#method.empty>
/// <https://docs.rs/rustls/latest/rustls/struct.RootCertStore.html#method.empty>
#[no_mangle]
pub extern "C" fn rustls_root_cert_store_new() -> *mut rustls_root_cert_store {
ffi_panic_boundary! {
Expand Down
10 changes: 5 additions & 5 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use crate::{
/// to turn it into a *rustls_client_config. This object is not safe
/// for concurrent mutation. Under the hood, it corresponds to a
/// `Box<ClientConfig>`.
/// <https://docs.rs/rustls/0.20.0/rustls/struct.ConfigBuilder.html>
/// <https://docs.rs/rustls/latest/rustls/struct.ConfigBuilder.html>
pub struct rustls_client_config_builder {
// We use the opaque struct pattern to tell C about our types without
// telling them what's inside.
Expand All @@ -55,7 +55,7 @@ impl BoxCastPtr for rustls_client_config_builder {}

/// A client config that is done being constructed and is now read-only.
/// Under the hood, this object corresponds to an `Arc<ClientConfig>`.
/// <https://docs.rs/rustls/0.20.0/rustls/struct.ClientConfig.html>
/// <https://docs.rs/rustls/latest/rustls/struct.ClientConfig.html>
pub struct rustls_client_config {
// We use the opaque struct pattern to tell C about our types without
// telling them what's inside.
Expand Down Expand Up @@ -296,7 +296,7 @@ impl rustls_client_config_builder {
/// Feel free to use an appropriate error from the RUSTLS_RESULT_CERT_*
/// section.
///
/// <https://docs.rs/rustls/0.20.0/rustls/client/struct.DangerousClientConfig.html#method.set_certificate_verifier>
/// <https://docs.rs/rustls/latest/rustls/client/struct.DangerousClientConfig.html#method.set_certificate_verifier>
#[no_mangle]
pub extern "C" fn rustls_client_config_builder_dangerous_set_certificate_verifier(
config_builder: *mut rustls_client_config_builder,
Expand Down Expand Up @@ -388,7 +388,7 @@ impl rustls_client_config_builder {
/// This function makes a copy of the data in `protocols` and does not retain
/// any pointers, so the caller can free the pointed-to memory after calling.
///
/// <https://docs.rs/rustls/0.20.0/rustls/client/struct.ClientConfig.html#structfield.alpn_protocols>
/// <https://docs.rs/rustls/latest/rustls/client/struct.ClientConfig.html#structfield.alpn_protocols>
#[no_mangle]
pub extern "C" fn rustls_client_config_builder_set_alpn_protocols(
builder: *mut rustls_client_config_builder,
Expand All @@ -410,7 +410,7 @@ impl rustls_client_config_builder {
}

/// Enable or disable SNI.
/// <https://docs.rs/rustls/0.20.0/rustls/struct.ClientConfig.html#structfield.enable_sni>
/// <https://docs.rs/rustls/latest/rustls/struct.ClientConfig.html#structfield.enable_sni>
#[no_mangle]
pub extern "C" fn rustls_client_config_builder_set_enable_sni(
config: *mut rustls_client_config_builder,
Expand Down
32 changes: 16 additions & 16 deletions src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl rustls_connection {
/// `rustls_connection_set_userdata`.
/// Returns 0 for success, or an errno value on error. Passes through return values
/// from callback. See rustls_read_callback for more details.
/// <https://docs.rs/rustls/0.20.0/rustls/enum.Connection.html#method.read_tls>
/// <https://docs.rs/rustls/latest/rustls/enum.Connection.html#method.read_tls>
#[no_mangle]
pub extern "C" fn rustls_connection_read_tls(
conn: *mut rustls_connection,
Expand Down Expand Up @@ -175,7 +175,7 @@ impl rustls_connection {
/// `rustls_connection_set_userdata`.
/// Returns 0 for success, or an errno value on error. Passes through return values
/// from callback. See rustls_write_callback for more details.
/// <https://docs.rs/rustls/0.20.0/rustls/enum.Connection.html#method.write_tls>
/// <https://docs.rs/rustls/latest/rustls/enum.Connection.html#method.write_tls>
#[no_mangle]
pub extern "C" fn rustls_connection_write_tls(
conn: *mut rustls_connection,
Expand Down Expand Up @@ -212,7 +212,7 @@ impl rustls_connection {
/// `rustls_connection_set_userdata`.
/// Returns 0 for success, or an errno value on error. Passes through return values
/// from callback. See rustls_write_callback for more details.
/// <https://docs.rs/rustls/0.20.0/rustls/struct.Writer.html#method.write_vectored>
/// <https://docs.rs/rustls/latest/rustls/struct.Writer.html#method.write_vectored>
#[no_mangle]
pub extern "C" fn rustls_connection_write_tls_vectored(
conn: *mut rustls_connection,
Expand Down Expand Up @@ -243,7 +243,7 @@ impl rustls_connection {
/// Decrypt any available ciphertext from the internal buffer and put it
/// into the internal plaintext buffer, potentially making bytes available
/// for rustls_connection_read().
/// <https://docs.rs/rustls/0.20.0/rustls/enum.Connection.html#method.process_new_packets>
/// <https://docs.rs/rustls/latest/rustls/enum.Connection.html#method.process_new_packets>
#[no_mangle]
pub extern "C" fn rustls_connection_process_new_packets(
conn: *mut rustls_connection,
Expand All @@ -265,7 +265,7 @@ impl rustls_connection {
}
}

/// <https://docs.rs/rustls/0.20.0/rustls/struct.CommonState.html#method.wants_read>
/// <https://docs.rs/rustls/latest/rustls/struct.CommonState.html#method.wants_read>
#[no_mangle]
pub extern "C" fn rustls_connection_wants_read(conn: *const rustls_connection) -> bool {
ffi_panic_boundary! {
Expand All @@ -274,7 +274,7 @@ impl rustls_connection {
}
}

/// <https://docs.rs/rustls/0.20.0/rustls/struct.CommonState.html#method.wants_write>
/// <https://docs.rs/rustls/latest/rustls/struct.CommonState.html#method.wants_write>
#[no_mangle]
pub extern "C" fn rustls_connection_wants_write(conn: *const rustls_connection) -> bool {
ffi_panic_boundary! {
Expand All @@ -283,7 +283,7 @@ impl rustls_connection {
}
}

/// <https://docs.rs/rustls/0.20.0/rustls/struct.CommonState.html#method.is_handshaking>
/// <https://docs.rs/rustls/latest/rustls/struct.CommonState.html#method.is_handshaking>
#[no_mangle]
pub extern "C" fn rustls_connection_is_handshaking(conn: *const rustls_connection) -> bool {
ffi_panic_boundary! {
Expand All @@ -296,7 +296,7 @@ impl rustls_connection {
/// to completing the TLS handshake) and unsent TLS records. By default, there
/// is no limit. The limit can be set at any time, even if the current buffer
/// use is higher.
/// <https://docs.rs/rustls/0.20.0/rustls/enum.Connection.html#method.set_buffer_limit>
/// <https://docs.rs/rustls/latest/rustls/enum.Connection.html#method.set_buffer_limit>
#[no_mangle]
pub extern "C" fn rustls_connection_set_buffer_limit(conn: *mut rustls_connection, n: usize) {
ffi_panic_boundary! {
Expand All @@ -306,7 +306,7 @@ impl rustls_connection {
}

/// Queues a close_notify fatal alert to be sent in the next write_tls call.
/// <https://docs.rs/rustls/0.20.0/rustls/enum.Connection.html#method.send_close_notify>
/// <https://docs.rs/rustls/latest/rustls/enum.Connection.html#method.send_close_notify>
#[no_mangle]
pub extern "C" fn rustls_connection_send_close_notify(conn: *mut rustls_connection) {
ffi_panic_boundary! {
Expand All @@ -323,7 +323,7 @@ impl rustls_connection {
/// affecting the connection. A mutating function call is one where the
/// first argument has type `struct rustls_connection *` (as opposed to
/// `const struct rustls_connection *`).
/// <https://docs.rs/rustls/0.20.0/rustls/enum.Connection.html#method.peer_certificates>
/// <https://docs.rs/rustls/latest/rustls/enum.Connection.html#method.peer_certificates>
#[no_mangle]
pub extern "C" fn rustls_connection_get_peer_certificate(
conn: *const rustls_connection,
Expand All @@ -348,7 +348,7 @@ impl rustls_connection {
/// first argument has type `struct rustls_connection *` (as opposed to
/// `const struct rustls_connection *`).
/// <https://www.iana.org/assignments/tls-parameters/>
/// <https://docs.rs/rustls/0.20.0/rustls/enum.Connection.html#method.alpn_protocol>
/// <https://docs.rs/rustls/latest/rustls/enum.Connection.html#method.alpn_protocol>
#[no_mangle]
pub extern "C" fn rustls_connection_get_alpn_protocol(
conn: *const rustls_connection,
Expand Down Expand Up @@ -376,8 +376,8 @@ impl rustls_connection {
/// Return the TLS protocol version that has been negotiated. Before this
/// has been decided during the handshake, this will return 0. Otherwise,
/// the u16 version number as defined in the relevant RFC is returned.
/// <https://docs.rs/rustls/0.20.0/rustls/enum.Connection.html#method.protocol_version>
/// <https://docs.rs/rustls/0.20.0/rustls/internal/msgs/enums/enum.ProtocolVersion.html>
/// <https://docs.rs/rustls/latest/rustls/enum.Connection.html#method.protocol_version>
/// <https://docs.rs/rustls/latest/rustls/internal/msgs/enums/enum.ProtocolVersion.html>
#[no_mangle]
pub extern "C" fn rustls_connection_get_protocol_version(
conn: *const rustls_connection,
Expand All @@ -394,7 +394,7 @@ impl rustls_connection {
/// Retrieves the cipher suite agreed with the peer.
/// This returns NULL until the ciphersuite is agreed.
/// The returned pointer lives as long as the program.
/// <https://docs.rs/rustls/0.20.0/rustls/enum.Connection.html#method.negotiated_cipher_suite>
/// <https://docs.rs/rustls/latest/rustls/enum.Connection.html#method.negotiated_cipher_suite>
#[no_mangle]
pub extern "C" fn rustls_connection_get_negotiated_ciphersuite(
conn: *const rustls_connection,
Expand Down Expand Up @@ -423,7 +423,7 @@ impl rustls_connection {
/// `rustls_connection_write_tls`.
/// On success, store the number of bytes actually written in *out_n
/// (this may be less than `count`).
/// <https://docs.rs/rustls/0.20.0/rustls/struct.Writer.html#method.write>
/// <https://docs.rs/rustls/latest/rustls/struct.Writer.html#method.write>
#[no_mangle]
pub extern "C" fn rustls_connection_write(
conn: *mut rustls_connection,
Expand Down Expand Up @@ -459,7 +459,7 @@ impl rustls_connection {
/// read from it, the memory in `buf` must be initialized before the call (for
/// Rust-internal reasons). Initializing a buffer once and then using it
/// multiple times without zeroizing before each call is fine.
/// <https://docs.rs/rustls/0.20.0/rustls/struct.Reader.html#method.read>
/// <https://docs.rs/rustls/latest/rustls/struct.Reader.html#method.read>
#[no_mangle]
pub extern "C" fn rustls_connection_read(
conn: *mut rustls_connection,
Expand Down
6 changes: 3 additions & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub enum rustls_result {
AcceptorNotReady = 7012,
AlreadyUsed = 7013,

// From https://docs.rs/rustls/0.21.0/rustls/enum.Error.html
// From https://docs.rs/rustls/latest/rustls/enum.Error.html
NoCertificatesPresented = 7101,
DecryptError = 7102,
FailedToGetCurrentTime = 7103,
Expand Down Expand Up @@ -220,7 +220,7 @@ pub enum rustls_result {
General = 7112,

// From Error, with fields that get flattened.
// https://docs.rs/rustls/0.21.0/rustls/internal/msgs/enums/enum.AlertDescription.html
// https://docs.rs/rustls/latest/rustls/internal/msgs/enums/enum.AlertDescription.html
AlertCloseNotify = 7200,
AlertUnexpectedMessage = 7201,
AlertBadRecordMac = 7202,
Expand Down Expand Up @@ -257,7 +257,7 @@ pub enum rustls_result {
AlertNoApplicationProtocol = 7233,
AlertUnknown = 7234,

// https://docs.rs/sct/0.7.0/sct/enum.Error.html
// https://docs.rs/sct/latest/sct/enum.Error.html
CertSCTMalformed = 7319,
CertSCTInvalidSignature = 7320,
CertSCTTimestampInFuture = 7321,
Expand Down
Loading