1+ vars = {
2+ # Change this variable to the name of one of the alterniative SSL
3+ # implementations below.
4+ # If you change this in an existing client, you should probably rm -fr
5+ # all the deps and rebuild everything from scratch.
6+ "ssl_impl" : "openssl" ,
7+
8+ # SSL implementation alternatives:
9+ "openssl" : "https://github.com/openssl/openssl.git@OpenSSL_1_0_2d" ,
10+ "boringssl" : "https://boringssl.googlesource.com/boringssl.git@2661"
11+ }
12+
113deps = {
14+ Var ("ssl_impl" ): Var (Var ("ssl_impl" )),
215 "gflags" : "https://github.com/gflags/gflags.git@v2.1.2" ,
316 "glog" : "https://github.com/benlaurie/glog.git@0.3.4-fix" ,
417 "googlemock" : "https://github.com/google/googlemock.git@release-1.7.0" ,
@@ -11,7 +24,6 @@ deps = {
1124 "libevhtp" : "https://github.com/ellzey/libevhtp.git@a89d9b3f9fdf2ebef41893b3d5e4466f4b0ecfda" ,
1225 "certificate-transparency/third_party/objecthash" :
1326 "https://github.com/benlaurie/objecthash.git@798f66bd8c5313da226aa7a60c114147910a7407" ,
14- "openssl" : "https://github.com/openssl/openssl.git@OpenSSL_1_0_2d" ,
1527 "protobuf" : "https://github.com/google/protobuf.git@v2.6.1" ,
1628 "protobuf/gtest" : "https://github.com/google/googletest.git@release-1.7.0" ,
1729 "libsnappy" : "https://github.com/google/snappy.git@1.1.3" ,
5870
5971num_cores = multiprocessing .cpu_count ()
6072
73+ print ("Building with %s" , Var ("ssl_impl" ))
6174print ("Using make %s with %d jobs" % (make , num_cores ))
6275
6376here = os .getcwd ()
@@ -74,9 +87,9 @@ hooks = [
7487 "action" : [ make , "-f" , os .path .join (here , "certificate-transparency/build.gclient" ), "_tcmalloc" ],
7588 },
7689 {
77- "name" : "openssl " ,
78- "pattern" : "^openssl /" ,
79- "action" : [ make , "-f" , os .path .join (here , "certificate-transparency/build.gclient" ), "_openssl" ],
90+ "name" : "ssl " ,
91+ "pattern" : Var ( "ssl_impl" ) + " /" ,
92+ "action" : [ make , "-f" , os .path .join (here , "certificate-transparency/build.gclient" ), "_" + Var ( "ssl_impl" ) ],
8093 },
8194 {
8295 "name" : "libevent" ,
@@ -103,11 +116,6 @@ hooks = [
103116 "pattern" : "^protobuf/" ,
104117 "action" : [ make , "-f" , os .path .join (here , "certificate-transparency/build.gclient" ), "_protobuf" ],
105118 },
106- {
107- "name" : "ldns" ,
108- "pattern" : "^ldns/" ,
109- "action" : [ make , "-f" , os .path .join (here , "certificate-transparency/build.gclient" ), "_ldns" ],
110- },
111119 {
112120 "name" : "sqlite3" ,
113121 "pattern" : "^sqlite3/" ,
@@ -137,11 +145,23 @@ hooks = [
137145 "name" : "objecthash" ,
138146 "pattern" : "^certificate-transparency/third_party/objecthash/" ,
139147 "action" : [ make , "-f" , os .path .join (here , "certificate-transparency/build.gclient" ), "_objecthash" ],
140- },
141- # Do this last
148+ }]
149+
150+ # Currently only Openssl is supported for building the DNS server due to LDNS's dependency.
151+ if Var ("ssl_impl" ) == 'openssl' :
152+ hooks .append (
153+ {
154+ "name" : "ldns" ,
155+ "pattern" : "^ldns/" ,
156+ "action" : [ make , "-f" , os .path .join (here , "certificate-transparency/build.gclient" ), "_ldns" ],
157+ })
158+ else :
159+ print ("NOT building DNS server since we're using BoringSSL." )
160+
161+ # Do this last
162+ hooks .append (
142163 {
143164 "name" : "ct" ,
144165 "pattern" : "^certificate-transparency/" ,
145166 "action" : [ make , "-j" , str (num_cores ), "-f" , os .path .join (here , "certificate-transparency/build.gclient" ), "_configure-ct" ],
146- }
147- ]
167+ })
0 commit comments