Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: net/cert/x509_util.h

Issue 1720653002: Add new functions to handle UPN and email addresses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't squash 10 other commits into the same CL Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/cert/x509_util.h
diff --git a/net/cert/x509_util.h b/net/cert/x509_util.h
index fb8c20f080d3f756256eab328f2f4d70d7a13844..d48a22fa8143af00e067df534058bb7db8e733d3 100644
--- a/net/cert/x509_util.h
+++ b/net/cert/x509_util.h
@@ -31,6 +31,10 @@ enum DigestAlgorithm {
DIGEST_SHA256
};
+// Microsoft User Principal Name: 1.3.6.1.4.1.311.20.2.3
+const uint8_t kUpnOid[] = {0x2b, 0x6, 0x1, 0x4, 0x1,
+ 0x82, 0x37, 0x14, 0x2, 0x3};
Ryan Sleevi 2016/02/27 00:38:45 I don't like exposing the constant's value in the
Kevin Cernekee 2016/02/27 19:06:23 Done.
+
// Creates a public-private keypair and a self-signed certificate.
// Subject, serial number and validity period are given as parameters.
// The certificate is signed by the private key in |key|. The key length and

Powered by Google App Engine
This is Rietveld 408576698