Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Vault
Commits
b69998de
Unverified
Commit
b69998de
authored
3 years ago
by
Lars Lehtonen
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
errwrap.Wrapf() mop-up (#11779)
parent
4239ea87
Branches unavailable
v1.10.2
v1.10.1
v1.10.0
v1.10.0-rc1
v1.9.6
v1.9.5
v1.9.4
v1.9.3
v1.9.2
v1.9.1
v1.9.0
v1.9.0-rc1
v1.8.11
v1.8.10
v1.8.9
v1.8.8
v1.8.7
v1.8.6
v1.8.5
v1.8.4
v1.8.3
v1.8.2
v1.8.1
v1.8.0
v1.8.0-rc2
v1.8.0-rc1
sdk/v0.4.1
sdk/v0.4.0
sdk/v0.3.0
sdk/v0.2.1
last-go-modable
api/v1.5.0
api/v1.4.1
api/v1.4.0
api/v1.3.1
api/v1.3.0
api/v1.2.0
api/v1.1.1
api/auth/userpass/v0.1.0
api/auth/ldap/v0.1.0
api/auth/kubernetes/v0.1.0
api/auth/gcp/v0.1.0
api/auth/azure/v0.1.0
api/auth/aws/v0.1.0
api/auth/approle/v0.1.1
api/auth/approle/v0.1.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
serviceregistration/consul/consul_service_registration.go
+1
-2
serviceregistration/consul/consul_service_registration.go
shamir/shamir.go
+1
-3
shamir/shamir.go
with
2 additions
and
5 deletions
+2
-5
serviceregistration/consul/consul_service_registration.go
+
1
-
2
View file @
b69998de
...
...
@@ -15,7 +15,6 @@ import (
"time"
"github.com/hashicorp/consul/api"
"github.com/hashicorp/errwrap"
log
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/sdk/helper/consts"
"github.com/hashicorp/vault/sdk/helper/parseutil"
...
...
@@ -152,7 +151,7 @@ func NewServiceRegistration(conf map[string]string, logger log.Logger, state sr.
consulConf
.
HttpClient
=
&
http
.
Client
{
Transport
:
consulConf
.
Transport
}
client
,
err
:=
api
.
NewClient
(
consulConf
)
if
err
!=
nil
{
return
nil
,
errwrap
.
Wrap
f
(
"client setup failed:
{{err}}
"
,
err
)
return
nil
,
fmt
.
Error
f
(
"client setup failed:
%w
"
,
err
)
}
// Setup the backend
...
...
This diff is collapsed.
Click to expand it.
shamir/shamir.go
+
1
-
3
View file @
b69998de
...
...
@@ -6,8 +6,6 @@ import (
"fmt"
mathrand
"math/rand"
"time"
"github.com/hashicorp/errwrap"
)
const
(
...
...
@@ -164,7 +162,7 @@ func Split(secret []byte, parts, threshold int) ([][]byte, error) {
for
idx
,
val
:=
range
secret
{
p
,
err
:=
makePolynomial
(
val
,
uint8
(
threshold
-
1
))
if
err
!=
nil
{
return
nil
,
errwrap
.
Wrap
f
(
"failed to generate polynomial:
{{err}}
"
,
err
)
return
nil
,
fmt
.
Error
f
(
"failed to generate polynomial:
%w
"
,
err
)
}
// Generate a `parts` number of (x,y) pairs
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help