Commit fe0f8ea1 authored by Joe Wilm's avatar Joe Wilm
Browse files

Rename Nid uid/UID to prevent breakage

parent 4940ca7e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -104,7 +104,8 @@ pub enum Nid {
    G,
    S,
    I,
    uid, // uniqueIdentifier
    /// uniqueIdentifier
    UID,
    CrlDistributionPoints,
    RSA_NP_MD5,
    SN,
@@ -170,5 +171,6 @@ pub enum Nid {
    ID_QT_UNOTICE,
    RC2_64_CBC,
    SMIMECaps,
    UID = 458 // userId
    /// Shown as UID in cert subject
    UserId = 458
}
+1 −1
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ fn test_nid_uid_value() {
    let cert = X509::from_pem(&mut file).ok().expect("Failed to load PEM");
    let subject = cert.subject_name();

    let cn = match subject.text_by_nid(Nid::UID) {
    let cn = match subject.text_by_nid(Nid::UserId) {
        Some(x) => x,
        None => panic!("Failed to read UID from cert"),
    };