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

Side by Side Diff: net/cert/x509_certificate.h

Issue 2761333002: Add a DevTools warning for a missing subjectAltName (Closed)
Patch Set: iOS & NSS fix Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_X509_CERTIFICATE_H_ 5 #ifndef NET_CERT_X509_CERTIFICATE_H_
6 #define NET_CERT_X509_CERTIFICATE_H_ 6 #define NET_CERT_X509_CERTIFICATE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 // Gets the DNS names in the certificate. Pursuant to RFC 2818, Section 3.1 191 // Gets the DNS names in the certificate. Pursuant to RFC 2818, Section 3.1
192 // Server Identity, if the certificate has a subjectAltName extension of 192 // Server Identity, if the certificate has a subjectAltName extension of
193 // type dNSName, this method gets the DNS names in that extension. 193 // type dNSName, this method gets the DNS names in that extension.
194 // Otherwise, it gets the common name in the subject field. 194 // Otherwise, it gets the common name in the subject field.
195 void GetDNSNames(std::vector<std::string>* dns_names) const; 195 void GetDNSNames(std::vector<std::string>* dns_names) const;
196 196
197 // Gets the subjectAltName extension field from the certificate, if any. 197 // Gets the subjectAltName extension field from the certificate, if any.
198 // For future extension; currently this only returns those name types that 198 // For future extension; currently this only returns those name types that
199 // are required for HTTP certificate name verification - see VerifyHostname. 199 // are required for HTTP certificate name verification - see VerifyHostname.
200 // Unrequired parameters may be passed as NULL. 200 // Unrequired parameters may be passed as nullptr.
eroman 2017/03/21 21:09:54 unrequired --> optional In fact, how about just d
201 void GetSubjectAltName(std::vector<std::string>* dns_names, 201 // Returns true if any dNSName or iPAddress SAN was present, regardless of
202 // whether or not |dns_names| or |ip_addrs| were non-null.
203 bool GetSubjectAltName(std::vector<std::string>* dns_names,
202 std::vector<std::string>* ip_addrs) const; 204 std::vector<std::string>* ip_addrs) const;
203 205
204 // Convenience method that returns whether this certificate has expired as of 206 // Convenience method that returns whether this certificate has expired as of
205 // now. 207 // now.
206 bool HasExpired() const; 208 bool HasExpired() const;
207 209
208 // Returns true if this object and |other| represent the same certificate. 210 // Returns true if this object and |other| represent the same certificate.
209 bool Equals(const X509Certificate* other) const; 211 bool Equals(const X509Certificate* other) const;
210 212
211 // Returns intermediate certificates added via AddIntermediateCertificate(). 213 // Returns intermediate certificates added via AddIntermediateCertificate().
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // Untrusted intermediate certificates associated with this certificate 447 // Untrusted intermediate certificates associated with this certificate
446 // that may be needed for chain building. 448 // that may be needed for chain building.
447 OSCertHandles intermediate_ca_certs_; 449 OSCertHandles intermediate_ca_certs_;
448 450
449 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 451 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
450 }; 452 };
451 453
452 } // namespace net 454 } // namespace net
453 455
454 #endif // NET_CERT_X509_CERTIFICATE_H_ 456 #endif // NET_CERT_X509_CERTIFICATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698