21
vendor/github.com/lucas-clemente/quic-go-certificates/LICENSE
generated
vendored
Normal file
21
vendor/github.com/lucas-clemente/quic-go-certificates/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Lucas Clemente
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
3
vendor/github.com/lucas-clemente/quic-go-certificates/README.md
generated
vendored
Normal file
3
vendor/github.com/lucas-clemente/quic-go-certificates/README.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# certsets
|
||||
|
||||
Common certificate sets for quic-go
|
||||
5824
vendor/github.com/lucas-clemente/quic-go-certificates/cert_set_2.go
generated
vendored
Normal file
5824
vendor/github.com/lucas-clemente/quic-go-certificates/cert_set_2.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5456
vendor/github.com/lucas-clemente/quic-go-certificates/cert_set_3.go
generated
vendored
Normal file
5456
vendor/github.com/lucas-clemente/quic-go-certificates/cert_set_3.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
34
vendor/github.com/lucas-clemente/quic-go-certificates/createCertSets.rb
generated
vendored
Executable file
34
vendor/github.com/lucas-clemente/quic-go-certificates/createCertSets.rb
generated
vendored
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Extract the common certificate sets from the chromium source to go
|
||||
#
|
||||
# Usage:
|
||||
# createCertSets.rb 1 ~/src/chromium/src/net/quic/crypto/common_cert_set_1*
|
||||
# createCertSets.rb 2 ~/src/chromium/src/net/quic/crypto/common_cert_set_2*
|
||||
|
||||
n = ARGV.shift
|
||||
mainFile = ARGV.shift
|
||||
dataFiles = ARGV
|
||||
|
||||
data = "package certsets\n"
|
||||
data += File.read(mainFile)
|
||||
data += (dataFiles.map{|p| File.read(p)}).join
|
||||
|
||||
# Good enough
|
||||
data.gsub!(/\/\*(.*?)\*\//m, '')
|
||||
data.gsub!(/^#include.+/, '')
|
||||
data.gsub!(/^#if 0(.*?)\n#endif/m, '')
|
||||
|
||||
data.gsub!(/^static const size_t kNumCerts.+/, '')
|
||||
data.gsub!(/static const size_t kLens[^}]+};/m, '')
|
||||
|
||||
data.gsub!('static const unsigned char* const kCerts[] = {', "var CertSet#{n} = [][]byte{")
|
||||
data.gsub!('static const uint64_t kHash = UINT64_C', "const CertSet#{n}Hash uint64 = ")
|
||||
|
||||
data.gsub!(/static const unsigned char kDERCert(\d+)\[\] = /, "var kDERCert\\1 = []byte")
|
||||
|
||||
data.gsub!(/kDERCert(\d+)/, "certSet#{n}Cert\\1")
|
||||
|
||||
File.write("cert_set_#{n}.go", data)
|
||||
|
||||
system("gofmt -w -s cert_set_#{n}.go")
|
||||
Reference in New Issue
Block a user