Rename Nid uid/UID to prevent breakage
This commit is contained in:
parent
4940ca7e92
commit
fe0f8ea1d8
|
|
@ -104,7 +104,8 @@ pub enum Nid {
|
||||||
G,
|
G,
|
||||||
S,
|
S,
|
||||||
I,
|
I,
|
||||||
uid, // uniqueIdentifier
|
/// uniqueIdentifier
|
||||||
|
UID,
|
||||||
CrlDistributionPoints,
|
CrlDistributionPoints,
|
||||||
RSA_NP_MD5,
|
RSA_NP_MD5,
|
||||||
SN,
|
SN,
|
||||||
|
|
@ -170,5 +171,6 @@ pub enum Nid {
|
||||||
ID_QT_UNOTICE,
|
ID_QT_UNOTICE,
|
||||||
RC2_64_CBC,
|
RC2_64_CBC,
|
||||||
SMIMECaps,
|
SMIMECaps,
|
||||||
UID = 458 // userId
|
/// Shown as UID in cert subject
|
||||||
|
UserId = 458
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ fn test_nid_uid_value() {
|
||||||
let cert = X509::from_pem(&mut file).ok().expect("Failed to load PEM");
|
let cert = X509::from_pem(&mut file).ok().expect("Failed to load PEM");
|
||||||
let subject = cert.subject_name();
|
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,
|
Some(x) => x,
|
||||||
None => panic!("Failed to read UID from cert"),
|
None => panic!("Failed to read UID from cert"),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue