OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <cert.h> // Must be included before certdb.h | 5 #include <cert.h> // Must be included before certdb.h |
6 #include <certdb.h> | 6 #include <certdb.h> |
7 #include <cryptohi.h> | 7 #include <cryptohi.h> |
8 #include <nss.h> | 8 #include <nss.h> |
9 #include <pk11pub.h> | 9 #include <pk11pub.h> |
10 #include <prerror.h> | 10 #include <prerror.h> |
11 #include <secder.h> | 11 #include <secder.h> |
12 #include <secmod.h> | 12 #include <secmod.h> |
13 #include <secport.h> | 13 #include <secport.h> |
14 | 14 |
15 #include <memory> | 15 #include <memory> |
16 | 16 |
17 #include "base/debug/leak_annotations.h" | 17 #include "base/debug/leak_annotations.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
19 #include "base/memory/singleton.h" | 19 #include "base/memory/singleton.h" |
20 #include "base/numerics/safe_conversions.h" | 20 #include "base/numerics/safe_conversions.h" |
21 #include "base/pickle.h" | 21 #include "base/pickle.h" |
22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
23 #include "crypto/ec_private_key.h" | 23 #include "crypto/ec_private_key.h" |
24 #include "crypto/nss_util.h" | 24 #include "crypto/nss_util.h" |
25 #include "crypto/nss_util_internal.h" | 25 #include "crypto/nss_util_internal.h" |
26 #include "crypto/rsa_private_key.h" | 26 #include "crypto/rsa_private_key.h" |
27 #include "crypto/scoped_nss_types.h" | 27 #include "crypto/scoped_nss_types.h" |
28 #include "crypto/third_party/nss/chromium-nss.h" | |
29 #include "net/cert/x509_certificate.h" | 28 #include "net/cert/x509_certificate.h" |
30 #include "net/cert/x509_util.h" | 29 #include "net/cert/x509_util.h" |
31 #include "net/cert/x509_util_nss.h" | 30 #include "net/cert/x509_util_nss.h" |
32 | 31 |
33 namespace net { | 32 namespace net { |
34 | 33 |
35 namespace { | 34 namespace { |
36 | 35 |
37 // Microsoft User Principal Name: 1.3.6.1.4.1.311.20.2.3 | 36 // Microsoft User Principal Name: 1.3.6.1.4.1.311.20.2.3 |
38 const uint8_t kUpnOid[] = {0x2b, 0x6, 0x1, 0x4, 0x1, | 37 const uint8_t kUpnOid[] = {0x2b, 0x6, 0x1, 0x4, 0x1, |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 base::SStringPrintf(&new_name, "%s #%d", nickname.c_str(), index++); | 406 base::SStringPrintf(&new_name, "%s #%d", nickname.c_str(), index++); |
408 temp_nickname = token_name + new_name; | 407 temp_nickname = token_name + new_name; |
409 } | 408 } |
410 | 409 |
411 return new_name; | 410 return new_name; |
412 } | 411 } |
413 | 412 |
414 } // namespace x509_util | 413 } // namespace x509_util |
415 | 414 |
416 } // namespace net | 415 } // namespace net |
OLD | NEW |