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
p2p
go-openssl
Commits
f4030af7
Commit
f4030af7
authored
Jul 29, 2020
by
Adin Schmahmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: make Ed25519 keys less special cased
parent
ab3d2c33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
key.go
key.go
+6
-2
No files found.
key.go
View file @
f4030af7
...
...
@@ -183,11 +183,15 @@ func (key *pKey) VerifyPKCS1v15(method Method, data, sig []byte) error {
ctx
:=
C
.
X_EVP_MD_CTX_new
()
defer
C
.
X_EVP_MD_CTX_free
(
ctx
)
if
len
(
sig
)
==
0
{
return
errors
.
New
(
"verifypkcs1v15: 0-length sig"
)
}
if
key
.
KeyType
()
==
KeyTypeED25519
{
// do ED specific one-shot sign
if
method
!=
nil
||
len
(
data
)
==
0
||
len
(
sig
)
==
0
{
return
errors
.
New
(
"verifypkcs1v15: 0-length data or
sig or
non-null digest"
)
if
method
!=
nil
||
len
(
data
)
==
0
{
return
errors
.
New
(
"verifypkcs1v15: 0-length data or non-null digest"
)
}
if
1
!=
C
.
X_EVP_DigestVerifyInit
(
ctx
,
nil
,
nil
,
nil
,
key
.
key
)
{
...
...
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