wildboar-ldap

Crates.iowildboar-ldap
lib.rswildboar-ldap
version1.0.0
created_at2025-07-27 19:55:50.232206+00
updated_at2025-07-27 19:55:50.232206+00
descriptionLightweight Directory Access Protocol (LDAP)
homepage
repositoryhttps://github.com/JonathanWilbur/asn1.rs/tree/master/ldap
max_upload_size
id1770365
size212,842
Jonathan Wilbur (JonathanWilbur)

documentation

README

Lightweight Directory Access Protocol (LDAP)

ASN.1 data structures and PDUs based on the ASN.1 definitions in IETF RFC 4511, which defines the Lightweight Directory Access Protocol (LDAP).

These libraries were generated entirely or in part by the ASN.1 Compilation Service offered by Wildboar Software. The ASN.1 compiler itself is closed-source and proprietary, but some of the libraries produced with it are released publicly under the MIT license.

If you would like to see additional ASN.1 libraries in Rust or other programming languages, or if you have any other questions, please contact us at contact@wildboarsoftware.com.

Example Usage

use x690::X690Codec;
use x690::ber::BER;
use wildboar_ldap::{
    LDAPMessage,
    BindRequest,
    AuthenticationChoice,
    LDAPMessage_protocolOp,
    _encode_LDAPMessage,
};

let bind_req = BindRequest::new(
    vec![ 1 ],
    vec![], // Empty DN
    AuthenticationChoice::simple(vec![]),
    vec![],
);

let msg = LDAPMessage::new(
    vec![ 1 ], // messageID
    LDAPMessage_protocolOp::bindRequest(bind_req),
    None, // no controls
    vec![], // no ASN.1 extensions
);

let encoded = _encode_LDAPMessage(&msg).unwrap();
let mut bytes = Vec::new();
let _ = BER.write(&mut bytes, &encoded).unwrap();
// Now the encoded LDAPMessage is in bytes.
assert!(bytes.len() > 2);
Commit count: 447

cargo fmt