]> granicus.if.org Git - curl/commitdiff
tests: add new feature 'SSLpinning'
authorDaniel Stenberg <daniel@haxx.se>
Tue, 4 Nov 2014 22:02:09 +0000 (23:02 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 4 Nov 2014 22:02:09 +0000 (23:02 +0100)
... and make test 2034 and 2035 require it, and have it set when built
with OpenSSL or GnuTLS.

tests/FILEFORMAT
tests/data/test2034
tests/data/test2035
tests/runtests.pl

index e484272244a79ecce2552a06db4dfff3211d791e..9fd179e6502637fff8fb13a1ddb1bbdade412edd 100644 (file)
@@ -213,6 +213,7 @@ NTLM
 OpenSSL
 socks
 SSL
+SSLpinning
 TLS-SRP
 TrackMemory
 unittest
index 92f6085d1d0422f25dd2398fcebb528e3090e1a6..965c9a1b1790ec1e3249b0f989e322d705604380 100644 (file)
@@ -25,6 +25,7 @@ MooMoo
 <client>
 <features>
 SSL
+SSLpinning
 </features>
 <server>
 https Server-localhost-sv.pem
index 8591be2718d07c2381cc883cdabfe5904d1b4771..64282fabefcaceb960484f98b588959f6897b3a6 100644 (file)
@@ -17,6 +17,7 @@ PEM certificate
 <client>
 <features>
 SSL
+SSLpinning
 </features>
 <server>
 https Server-localhost-sv.pem
index f52678c498433a713c21adac2acc014ab2a254d3..8802c0c98dee374b511d589283495450fc4b8f8d 100755 (executable)
@@ -224,6 +224,8 @@ my $has_axtls;    # built with axTLS
 my $has_winssl;   # built with WinSSL    (Secure Channel aka Schannel)
 my $has_darwinssl;# build with DarwinSSL (Secure Transport)
 
+my $has_sslpinning; # built with a TLS backend that supports pinning
+
 my $has_shared = "unknown";  # built shared
 
 my $resolver;     # string to hold the resolver backend
@@ -2299,10 +2301,12 @@ sub checksystem {
            }
            elsif ($libcurl =~ /openssl/i) {
                $has_openssl=1;
+               $has_sslpinning=1;
                $ssllib="OpenSSL";
            }
            elsif ($libcurl =~ /gnutls/i) {
                $has_gnutls=1;
+               $has_sslpinning=1;
                $ssllib="GnuTLS";
            }
            elsif ($libcurl =~ /nss/i) {
@@ -2758,6 +2762,11 @@ sub singletest {
                     next;
                 }
             }
+            elsif($1 eq "SSLpinning") {
+                if($has_sslpinning) {
+                    next;
+                }
+            }
             elsif($1 eq "OpenSSL") {
                 if($has_openssl) {
                     next;