Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai3
tools
tabacco
Commits
851aa569
Commit
851aa569
authored
Aug 28, 2018
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update go-common dep
parent
dbccc215
Pipeline
#1173
passed with stages
in 1 minute and 37 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
16 deletions
+22
-16
vendor/git.autistici.org/ai3/go-common/clientutil/backend.go
vendor/git.autistici.org/ai3/go-common/clientutil/backend.go
+1
-1
vendor/git.autistici.org/ai3/go-common/clientutil/tls.go
vendor/git.autistici.org/ai3/go-common/clientutil/tls.go
+9
-6
vendor/git.autistici.org/ai3/go-common/misc.go
vendor/git.autistici.org/ai3/go-common/misc.go
+4
-1
vendor/vendor.json
vendor/vendor.json
+8
-8
No files found.
vendor/git.autistici.org/ai3/go-common/clientutil/backend.go
View file @
851aa569
...
...
@@ -13,7 +13,7 @@ import (
// 'shard' parameter on their APIs.
type
BackendConfig
struct
{
URL
string
`yaml:"url"`
TLSConfig
*
TLSClientConfig
`yaml:"tls
_config
"`
TLSConfig
*
TLSClientConfig
`yaml:"tls"`
Sharded
bool
`yaml:"sharded"`
Debug
bool
`yaml:"debug"`
}
...
...
vendor/git.autistici.org/ai3/go-common/clientutil/tls.go
View file @
851aa569
...
...
@@ -2,6 +2,7 @@ package clientutil
import
(
"crypto/tls"
"errors"
common
"git.autistici.org/ai3/go-common"
)
...
...
@@ -16,6 +17,10 @@ type TLSClientConfig struct {
// TLSConfig returns a tls.Config object with the current configuration.
func
(
c
*
TLSClientConfig
)
TLSConfig
()
(
*
tls
.
Config
,
error
)
{
if
c
.
Cert
==
""
||
c
.
Key
==
""
||
c
.
CA
==
""
{
return
nil
,
errors
.
New
(
"incomplete client tls specification"
)
}
cert
,
err
:=
tls
.
LoadX509KeyPair
(
c
.
Cert
,
c
.
Key
)
if
err
!=
nil
{
return
nil
,
err
...
...
@@ -24,13 +29,11 @@ func (c *TLSClientConfig) TLSConfig() (*tls.Config, error) {
Certificates
:
[]
tls
.
Certificate
{
cert
},
}
if
c
.
CA
!=
""
{
cas
,
err
:=
common
.
LoadCA
(
c
.
CA
)
if
err
!=
nil
{
return
nil
,
err
}
tlsConf
.
RootCAs
=
cas
cas
,
err
:=
common
.
LoadCA
(
c
.
CA
)
if
err
!=
nil
{
return
nil
,
err
}
tlsConf
.
RootCAs
=
cas
tlsConf
.
BuildNameToCertificate
()
return
tlsConf
,
nil
...
...
vendor/git.autistici.org/ai3/go-common/misc.go
View file @
851aa569
...
...
@@ -2,6 +2,7 @@ package common
import
(
"crypto/x509"
"fmt"
"io/ioutil"
)
...
...
@@ -12,6 +13,8 @@ func LoadCA(path string) (*x509.CertPool, error) {
return
nil
,
err
}
cas
:=
x509
.
NewCertPool
()
cas
.
AppendCertsFromPEM
(
data
)
if
!
cas
.
AppendCertsFromPEM
(
data
)
{
return
nil
,
fmt
.
Errorf
(
"no certificates could be parsed in %s"
,
path
)
}
return
cas
,
nil
}
vendor/vendor.json
View file @
851aa569
...
...
@@ -3,22 +3,22 @@
"ignore"
:
"test"
,
"package"
:
[
{
"checksumSHA1"
:
"
raJx5BjBbVQG0ylGSjPpi+JvqjU
="
,
"checksumSHA1"
:
"
pLvPnUablirQucyALgrso9hLG4E
="
,
"path"
:
"git.autistici.org/ai3/go-common"
,
"revision"
:
"
39b1908a9e399db1a0ceebb0fe4f3d3c35298357
"
,
"revisionTime"
:
"2018-08-
17
T06:
38:2
5Z"
"revision"
:
"
232cb4db4b1a9c57075dcdab7f2d8dfdf7590ce5
"
,
"revisionTime"
:
"2018-08-
28
T06:
59:3
5Z"
},
{
"checksumSHA1"
:
"
49MChcx9D+/+pCyl/F469TcQcK4
="
,
"checksumSHA1"
:
"
WxcDAOyeiMJa5QyJAhsl6swy8ks
="
,
"path"
:
"git.autistici.org/ai3/go-common/clientutil"
,
"revision"
:
"
39b1908a9e399db1a0ceebb0fe4f3d3c35298357
"
,
"revisionTime"
:
"2018-08-
17
T06:
38:2
5Z"
"revision"
:
"
232cb4db4b1a9c57075dcdab7f2d8dfdf7590ce5
"
,
"revisionTime"
:
"2018-08-
28
T06:
59:3
5Z"
},
{
"checksumSHA1"
:
"7VBLbwaK1m/jwsk8sLsh4iD9T/s="
,
"path"
:
"git.autistici.org/ai3/go-common/serverutil"
,
"revision"
:
"
39b1908a9e399db1a0ceebb0fe4f3d3c35298357
"
,
"revisionTime"
:
"2018-08-
17
T06:
38:2
5Z"
"revision"
:
"
232cb4db4b1a9c57075dcdab7f2d8dfdf7590ce5
"
,
"revisionTime"
:
"2018-08-
28
T06:
59:3
5Z"
},
{
"checksumSHA1"
:
"spyv5/YFBjYyZLZa1U2LBfDR8PM="
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment