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: Fix dead links #369

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
25 changes: 25 additions & 0 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Verify documentation integrity
'on':
workflow_call: null
jobs:
cov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build documentation - treat doc warnings as problems
run: RUSTDOCFLAGS="-D warnings" cargo doc

- uses: cargo-bins/[email protected]
- name: Install cargo-deadlinks binary
run: cargo binstall [email protected] --no-confirm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


# `no-build` is passed, as we already built the docs
- name: Check for dead links in docs
run: cargo deadlinks --no-build

- name: Check for dead https(s) links in docs
run: cargo deadlinks --check-http --no-build
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
code-coverage:
uses: ./.github/workflows/ci_code_coverage.yml

docs:
uses: ./.github/workflows/ci_docs.yml

verify-clean-address-space:
uses: ./.github/workflows/ci_verify_clean_address_space.yml

Expand Down
4 changes: 0 additions & 4 deletions lib/src/client/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ impl ClientBuilder {

/// Yields a [`Client`] from the values set by the builder. If the builder is not in a valid state
/// it will return `None`.
///
/// [`Client`]: client/struct.Client.html
pub fn client(self) -> Option<Client> {
if self.is_valid() {
Some(Client::new(self.config))
Expand All @@ -35,8 +33,6 @@ impl ClientBuilder {
}

/// Yields a [`ClientConfig`] from the values set by the builder.
///
/// [`ClientConfig`]: ../config/struct.ClientConfig.html
pub fn config(self) -> ClientConfig {
self.config
}
Expand Down
5 changes: 0 additions & 5 deletions lib/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@
//! }
//!}
//! ```
//!
//! [`Client`]: ./client/struct.Client.html
//! [`ClientConfig`]: ./config/struct.ClientConfig.html
//! [`ClientBuilder`]: ./client_builder/struct.ClientBuilder.html
//! [`Session`]: ./session/struct.Session.html

mod builder;
mod config;
Expand Down
6 changes: 3 additions & 3 deletions lib/src/client/session/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl Client {
.unwrap())
}

/// Connects to an a server directly using provided [`SessionInfo`].
/// Connects to a server directly using provided SessionInfo.
///
/// This function returns both a reference to the session, and a `SessionEventLoop`. You must run and
/// poll the event loop in order to actually establish a connection.
Expand Down Expand Up @@ -237,7 +237,7 @@ impl Client {
}
}

/// Creates a new [`AsyncSession`] using the default endpoint specified in the config. If
/// Creates a new [`Session`] using the default endpoint specified in the config. If
/// there is no default, or the endpoint does not exist, this function will return an error
///
/// This function returns both a reference to the session, and a `SessionEventLoop`. You must run and
Expand All @@ -264,7 +264,7 @@ impl Client {
self.new_session_from_info(session_info)
}

/// Creates a new [`AsyncSession`] using the named endpoint id. If there is no
/// Creates a new [`Session`] using the named endpoint id. If there is no
/// endpoint of that id in the config, this function will return an error
///
/// This function returns both a reference to the session, and a `SessionEventLoop`. You must run and
Expand Down
2 changes: 1 addition & 1 deletion lib/src/client/session/services/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl Session {
///
/// # Returns
///
/// * `Ok(Vec<ClientHistoryUpdateResult>)` - A list of [`ClientHistoryUpdateResult`] results corresponding to history update operation.
/// * `Ok(Vec<HistoryUpdateResult>)` - A list of [`HistoryUpdateResult`] results corresponding to history update operation.
/// * `Err(StatusCode)` - Request failed, [Status code](StatusCode) is the reason for failure.
///
pub async fn history_update(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/crypto/certificate_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ impl CertificateStore {
}

/// Returns a certificate file name from the cert's issuer and thumbprint fields.
/// File name is either "prefix - [thumbprint].der" or "thumbprint.der" depending on
/// File name is either "prefix - \[thumbprint\].der" or "thumbprint.der" depending on
/// the cert's common name being empty or not
pub fn cert_file_name(cert: &X509) -> String {
let prefix = if let Ok(common_name) = cert.common_name() {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/crypto/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use super::{SHA1_SIZE, SHA256_SIZE};

/// Pseudo random `P_SHA` implementation for creating pseudo random range of bytes from an input
///
/// https://www.ietf.org/rfc/rfc4346.txt
/// https://tools.ietf.org/html/rfc5246
/// <https://www.ietf.org/rfc/rfc4346.txt>
/// <https://tools.ietf.org/html/rfc5246>
///
/// P_SHA1(secret, seed) = HMAC_SHA1(secret, A(1) + seed) +
/// HMAC_SHA1(secret, A(2) + seed) +
Expand Down
2 changes: 1 addition & 1 deletion lib/src/crypto/pkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ impl PublicKey {

/// This module contains a bunch of nasty stuff to implement OAEP-SHA256 since there are no helpers in OpenSSL to do it
///
/// https://stackoverflow.com/questions/17784022/how-to-encrypt-data-using-rsa-with-sha-256-as-hash-function-and-mgf1-as-mask-ge
/// <https://stackoverflow.com/questions/17784022/how-to-encrypt-data-using-rsa-with-sha-256-as-hash-function-and-mgf1-as-mask-ge>
mod oaep_sha256 {
use foreign_types::ForeignType;
use libc::*;
Expand Down
20 changes: 10 additions & 10 deletions lib/src/crypto/security_policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ mod basic_256_sha_256 {

/// Basic128Rsa15 security policy (deprecated in OPC UA 1.04)
///
/// AsymmetricSignatureAlgorithm – RsaSha1 – (http://www.w3.org/2000/09/xmldsig#rsa-sha1).
/// AsymmetricEncryptionAlgorithm – Rsa15 – (http://www.w3.org/2001/04/xmlenc#rsa-1_5).
/// SymmetricSignatureAlgorithm – HmacSha1 – (http://www.w3.org/2000/09/xmldsig#hmac-sha1).
/// SymmetricEncryptionAlgorithm – Aes128 – (http://www.w3.org/2001/04/xmlenc#aes128-cbc).
/// KeyDerivationAlgorithm – PSha1 – (http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/dk/p_sha1).
/// AsymmetricSignatureAlgorithm – RsaSha1 – (<http://www.w3.org/2000/09/xmldsig#rsa-sha1>).
/// AsymmetricEncryptionAlgorithm – Rsa15 – (<http://www.w3.org/2001/04/xmlenc#rsa-1_5>).
/// SymmetricSignatureAlgorithm – HmacSha1 – (<http://www.w3.org/2000/09/xmldsig#hmac-sha1>).
/// SymmetricEncryptionAlgorithm – Aes128 – (<http://www.w3.org/2001/04/xmlenc#aes128-cbc>).
/// KeyDerivationAlgorithm – PSha1 – (<http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/dk/p_sha1>).
///
/// # Limits
///
Expand All @@ -135,11 +135,11 @@ mod basic_128_rsa_15 {

/// Basic256 security policy (deprecated in OPC UA 1.04)
///
/// AsymmetricSignatureAlgorithm – RsaSha1 – (http://www.w3.org/2000/09/xmldsig#rsa-sha1).
/// AsymmetricEncryptionAlgorithm – RsaOaep – (http://www.w3.org/2001/04/xmlenc#rsa-oaep).
/// SymmetricSignatureAlgorithm – HmacSha1 – (http://www.w3.org/2000/09/xmldsig#hmac-sha1).
/// SymmetricEncryptionAlgorithm – Aes256 – (http://www.w3.org/2001/04/xmlenc#aes256-cbc).
/// KeyDerivationAlgorithm – PSha1 – (http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/dk/p_sha1).
/// AsymmetricSignatureAlgorithm – RsaSha1 – (<http://www.w3.org/2000/09/xmldsig#rsa-sha1>).
/// AsymmetricEncryptionAlgorithm – RsaOaep – (<http://www.w3.org/2001/04/xmlenc#rsa-oaep>).
/// SymmetricSignatureAlgorithm – HmacSha1 – (<http://www.w3.org/2000/09/xmldsig#hmac-sha1>).
/// SymmetricEncryptionAlgorithm – Aes256 – (<http://www.w3.org/2001/04/xmlenc#aes256-cbc>).
/// KeyDerivationAlgorithm – PSha1 – (<http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/dk/p_sha1>).
///
/// # Limits
///
Expand Down
2 changes: 1 addition & 1 deletion lib/src/server/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub type Connections = Vec<Arc<RwLock<TcpTransport>>>;
/// [`run_server`]: #method.run_server
/// [`ServerConfig`]: ../config/struct.ServerConfig.html
/// [`AddressSpace`]: ../address_space/address_space/struct.AddressSpace.html
/// [`CertificateStore`]: ../../opcua_core/crypto/certificate_store/struct.CertificateStore.html
/// [`CertificateStore`]: ../../crypto/certificate_store/struct.CertificateStore.html
///
pub struct Server {
/// List of pending polling actions to add to the server once run is called
Expand Down
4 changes: 2 additions & 2 deletions lib/src/types/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pub struct Array {

/// Multi dimension array which can contain any scalar type, all the same type. Nested
/// arrays are rejected. Higher rank dimensions are serialized first. For example an array
/// with dimensions [2,2,2] is written in this order - [0,0,0], [0,0,1], [0,1,0], [0,1,1],
/// [1,0,0], [1,0,1], [1,1,0], [1,1,1].
/// with dimensions \[2,2,2\] is written in this order - \[0,0,0\], \[0,0,1\], \[0,1,0\],
/// \[0,1,1\], \[1,0,0\], \[1,0,1\], \[1,1,0\], \[1,1,1\].
pub dimensions: Option<Vec<u32>>,
}

Expand Down
Loading