| Crates.io | wildboar-ldap |
| lib.rs | wildboar-ldap |
| version | 1.0.0 |
| created_at | 2025-07-27 19:55:50.232206+00 |
| updated_at | 2025-07-27 19:55:50.232206+00 |
| description | Lightweight Directory Access Protocol (LDAP) |
| homepage | |
| repository | https://github.com/JonathanWilbur/asn1.rs/tree/master/ldap |
| max_upload_size | |
| id | 1770365 |
| size | 212,842 |
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.
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);