parco-ws-security-0.1.7 has been yanked.
WS-Security SOAP Helper Library
This Rust library provides utilities for constructing WS-Security headers with XML signatures, timestamps, and X.509 certificate support, suitable for SOAP messages.
Overview
The library allows you to:
- Generate WS-Security headers with timestamps and digital signatures.
- Sign SOAP messages using RSA private keys or signing keys.
- Easily integrate cryptographic utilities such as SHA-1, RSA, and Base64 encoding.
Features
[✅] - "cms-sign" adds support for Crypto Message Syntax via Sha256 Digest + Rsa Signature
Example
use ;
const PRIVATE_KEY_PEM: &str = include_str!;
const CERTIFICATE_BASE64: &str = include_str!;
/// if you're key is pkcs8 use this else refer to [`rsa`] documentation for parsing your key
let private_key = from_pkcs8_pem.unwrap;
let security_header = new_with_private_key;
Cms-Sign
The "cms-sign" feature enables
use ;
let cert_pem = include_str!;
let private_key_pem = include_str!;
let rsa_private_key = from_pkcs8_pem.unwrap;
let cms_sign = try_new.unwrap;
let timestamp = now.to_rfc3339_opts;
println!;