Changeset 159692 in webkit
- Timestamp:
- Nov 22, 2013 9:27:59 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r159691 r159692 1 2013-11-22 Robert Sipka <sipka@inf.u-szeged.hu> 2 3 [curl] Fix of SSL certificate chain storage 4 https://bugs.webkit.org/show_bug.cgi?id=124768 5 6 Reviewed by Brent Fulgham. 7 8 Change the certificates storage type into ListHashSet 9 from HashSet to keep the chain order in each case. 10 This ensures that there is no difference between the stored 11 and the recieved certificate chain. 12 13 * platform/network/curl/SSLHandle.cpp: 14 (WebCore::allowsAnyHTTPSCertificateHosts): 15 (WebCore::sslIgnoreHTTPSCertificate): 16 (WebCore::pemData): 17 (WebCore::certVerifyCallback): 18 1 19 2013-11-22 Brent Fulgham <bfulgham@apple.com> 2 20 -
trunk/Source/WebCore/platform/network/curl/SSLHandle.cpp
r159678 r159692 33 33 #include <openssl/ssl.h> 34 34 #include <openssl/x509_vfy.h> 35 #include <wtf/ HashSet.h>35 #include <wtf/ListHashSet.h> 36 36 37 37 namespace WebCore { 38 38 39 static HashMap<String, HashSet<String>> allowedHosts;39 static HashMap<String, ListHashSet<String>> allowedHosts; 40 40 41 41 void allowsAnyHTTPSCertificateHosts(const String& host) 42 42 { 43 HashSet<String> certificates;43 ListHashSet<String> certificates; 44 44 allowedHosts.set(host, certificates); 45 45 } 46 46 47 bool sslIgnoreHTTPSCertificate(const String& host, const HashSet<String>& certificates)48 { 49 HashMap<String, HashSet<String>>::iterator it = allowedHosts.find(host);47 bool sslIgnoreHTTPSCertificate(const String& host, const ListHashSet<String>& certificates) 48 { 49 HashMap<String, ListHashSet<String>>::iterator it = allowedHosts.find(host); 50 50 if (it != allowedHosts.end()) { 51 51 if ((it->value).isEmpty()) { … … 55 55 if (certificates.size() != it->value.size()) 56 56 return false; 57 HashSet<String>::const_iterator certsIter = certificates.begin();58 HashSet<String>::iterator valueIter = (it->value).begin();57 ListHashSet<String>::const_iterator certsIter = certificates.begin(); 58 ListHashSet<String>::iterator valueIter = (it->value).begin(); 59 59 for (; valueIter != (it->value).end(); ++valueIter, ++certsIter) { 60 60 if (*certsIter != *valueIter) … … 125 125 #if !PLATFORM(WIN) 126 126 // success of certificates extraction 127 bool pemData(X509_STORE_CTX* ctx, HashSet<String>& certificates)127 bool pemData(X509_STORE_CTX* ctx, ListHashSet<String>& certificates) 128 128 { 129 129 bool ok = true; … … 174 174 175 175 #if PLATFORM(WIN) 176 HashMap<String, HashSet<String>>::iterator it = allowedHosts.find(host);176 HashMap<String, ListHashSet<String>>::iterator it = allowedHosts.find(host); 177 177 ok = (it != allowedHosts.end()); 178 178 #else 179 HashSet<String> certificates;179 ListHashSet<String> certificates; 180 180 if (!pemData(ctx, certificates)) 181 181 return 0;
Note: See TracChangeset
for help on using the changeset viewer.