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

Side by Side Diff: net/cert/internal/verify_name_match.h

Issue 1125333005: RFC 2459 name comparison. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ios copy_test_data Created 5 years, 4 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 unified diff | Download patch
OLDNEW
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 #ifndef NET_CERT_INTERNAL_VERIFY_NAME_MATCH_H_ 5 #ifndef NET_CERT_INTERNAL_VERIFY_NAME_MATCH_H_
6 #define NET_CERT_INTERNAL_VERIFY_NAME_MATCH_H_ 6 #define NET_CERT_INTERNAL_VERIFY_NAME_MATCH_H_
7 7
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "net/base/net_export.h" 9 #include "net/base/net_export.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 namespace der { 13 namespace der {
14 class Input; 14 class Input;
15 } // namespace der 15 } // namespace der
16 16
17 // Compare DER-encoded X.501 Name values according to RFC 5280 rules. 17 // Compare DER-encoded X.501 Name values according to RFC 5280 rules.
18 // TODO(mattm): Doesn't actually implement RFC 5280 matching yet. 18 // |a_rdn_sequence| and |b_rdn_sequence| should be the DER-encoded RDNSequence
19 // Returns true if |a| and |b| match. 19 // values (not including the Sequence tag).
20 NET_EXPORT bool VerifyNameMatch(const der::Input& a, const der::Input& b); 20 // Returns true if |a_rdn_sequence| and |b_rdn_sequence| match.
21 NET_EXPORT bool VerifyNameMatch(const der::Input& a_rdn_sequence,
22 const der::Input& b_rdn_sequence);
21 23
22 } // namespace net 24 } // namespace net
23 25
24 #endif // NET_CERT_INTERNAL_VERIFY_NAME_MATCH_H_ 26 #endif // NET_CERT_INTERNAL_VERIFY_NAME_MATCH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698