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
id
auth
Commits
af9b4945
Commit
af9b4945
authored
Aug 23, 2020
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade ai3/go-common (argon2i fixes)
parent
60a8ffc1
Pipeline
#7580
passed with stages
in 1 minute and 21 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
20 deletions
+34
-20
vendor/git.autistici.org/ai3/go-common/pwhash/argon2.go
vendor/git.autistici.org/ai3/go-common/pwhash/argon2.go
+13
-0
vendor/git.autistici.org/ai3/go-common/pwhash/password.go
vendor/git.autistici.org/ai3/go-common/pwhash/password.go
+6
-5
vendor/vendor.json
vendor/vendor.json
+15
-15
No files found.
vendor/git.autistici.org/ai3/go-common/pwhash/argon2.go
View file @
af9b4945
...
...
@@ -6,6 +6,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"log"
"strconv"
"strings"
...
...
@@ -54,6 +55,16 @@ func NewArgon2WithParams(time, mem uint32, threads uint8) PasswordHash {
return
newArgon2PasswordHash
(
time
,
mem
,
threads
,
&
a2Codec
{})
}
// NewArgon2Std returns an Argon2i-based PasswordHash that conforms
// to the reference implementation encoding, using default parameters.
func
NewArgon2Std
()
PasswordHash
{
return
NewArgon2StdWithParams
(
defaultArgon2Params
.
Time
,
defaultArgon2Params
.
Memory
,
defaultArgon2Params
.
Threads
,
)
}
// NewArgon2StdWithParams returns an Argon2i-based PasswordHash using
// the specified parameters for time, memory, and number of
// threads. This will use the string encoding ("$argon2$") documented
...
...
@@ -204,5 +215,7 @@ func (*argon2StdCodec) decodeArgon2Hash(s string) (params argon2Params, salt []b
return
}
dk
,
err
=
base64
.
RawStdEncoding
.
DecodeString
(
parts
[
3
])
log
.
Printf
(
"params: %+v"
,
params
)
return
}
vendor/git.autistici.org/ai3/go-common/pwhash/password.go
View file @
af9b4945
...
...
@@ -49,11 +49,12 @@ func getRandomBytes(n int) []byte {
// A registry of default handlers for decoding passwords.
var
prefixRegistry
=
map
[
string
]
PasswordHash
{
"$1$"
:
NewSystemCrypt
(),
"$5$"
:
NewSystemCrypt
(),
"$6$"
:
NewSystemCrypt
(),
"$s$"
:
NewScrypt
(),
"$a2$"
:
NewArgon2
(),
"$1$"
:
NewSystemCrypt
(),
"$5$"
:
NewSystemCrypt
(),
"$6$"
:
NewSystemCrypt
(),
"$s$"
:
NewScrypt
(),
"$a2$"
:
NewArgon2
(),
"$argon2i$"
:
NewArgon2Std
(),
}
// ComparePassword returns true if the given password matches the
...
...
vendor/vendor.json
View file @
af9b4945
...
...
@@ -11,44 +11,44 @@
{
"checksumSHA1"
:
"gQae1gsfGat/VmlQHY9TaiiZGZk="
,
"path"
:
"git.autistici.org/ai3/go-common"
,
"revision"
:
"
3e5c304bf9d132bc389e7d168d93dcf1c43c7265
"
,
"revisionTime"
:
"2020-08-23T1
5:18
:3
8
Z"
"revision"
:
"
b151964cbeb8f4474c973585417649ee14e4b0c4
"
,
"revisionTime"
:
"2020-08-23T1
7:45
:3
6
Z"
},
{
"checksumSHA1"
:
"PrVrwtr3weyGRa2j+SIYEMjtuvU="
,
"path"
:
"git.autistici.org/ai3/go-common/clientutil"
,
"revision"
:
"
3e5c304bf9d132bc389e7d168d93dcf1c43c7265
"
,
"revisionTime"
:
"2020-08-23T1
5:18
:3
8
Z"
"revision"
:
"
b151964cbeb8f4474c973585417649ee14e4b0c4
"
,
"revisionTime"
:
"2020-08-23T1
7:45
:3
6
Z"
},
{
"checksumSHA1"
:
"71XnADFH0zmU4hW8deQffXpbDMQ="
,
"path"
:
"git.autistici.org/ai3/go-common/ldap"
,
"revision"
:
"
3e5c304bf9d132bc389e7d168d93dcf1c43c7265
"
,
"revisionTime"
:
"2020-08-23T1
5:18
:3
8
Z"
"revision"
:
"
b151964cbeb8f4474c973585417649ee14e4b0c4
"
,
"revisionTime"
:
"2020-08-23T1
7:45
:3
6
Z"
},
{
"checksumSHA1"
:
"ETt1H7ZXeT+mOGVuWDvgGBVx98k="
,
"path"
:
"git.autistici.org/ai3/go-common/ldap/compositetypes"
,
"revision"
:
"
3e5c304bf9d132bc389e7d168d93dcf1c43c7265
"
,
"revisionTime"
:
"2020-08-23T1
5:18
:3
8
Z"
"revision"
:
"
b151964cbeb8f4474c973585417649ee14e4b0c4
"
,
"revisionTime"
:
"2020-08-23T1
7:45
:3
6
Z"
},
{
"checksumSHA1"
:
"
TswnetMKZo4KCydKOkzoGrTMwmA
="
,
"checksumSHA1"
:
"
J011m4Yuj/ujUozVyMUCAdEk2fI
="
,
"path"
:
"git.autistici.org/ai3/go-common/pwhash"
,
"revision"
:
"
3e5c304bf9d132bc389e7d168d93dcf1c43c7265
"
,
"revisionTime"
:
"2020-08-23T1
5:18
:3
8
Z"
"revision"
:
"
b151964cbeb8f4474c973585417649ee14e4b0c4
"
,
"revisionTime"
:
"2020-08-23T1
7:45
:3
6
Z"
},
{
"checksumSHA1"
:
"C510IXCxCms4yjWjIu1pbdqPwN4="
,
"path"
:
"git.autistici.org/ai3/go-common/tracing"
,
"revision"
:
"
3e5c304bf9d132bc389e7d168d93dcf1c43c7265
"
,
"revisionTime"
:
"2020-08-23T1
5:18
:3
8
Z"
"revision"
:
"
b151964cbeb8f4474c973585417649ee14e4b0c4
"
,
"revisionTime"
:
"2020-08-23T1
7:45
:3
6
Z"
},
{
"checksumSHA1"
:
"jRc0JfRUtCr3xxkgwRDVppsSnl0="
,
"path"
:
"git.autistici.org/ai3/go-common/unix"
,
"revision"
:
"
3e5c304bf9d132bc389e7d168d93dcf1c43c7265
"
,
"revisionTime"
:
"2020-08-23T1
5:18
:3
8
Z"
"revision"
:
"
b151964cbeb8f4474c973585417649ee14e4b0c4
"
,
"revisionTime"
:
"2020-08-23T1
7:45
:3
6
Z"
},
{
"checksumSHA1"
:
"J0QeD9LVccFOejgPKa0td8JD0rY="
,
...
...
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