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
d9b64028
Unverified
Commit
d9b64028
authored
Jul 29, 2020
by
Adin Schmahmann
Committed by
GitHub
Jul 29, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7 from libp2p/refactor/ed25519-less-special
make ed25519 less special
parents
ab3d2c33
f4030af7
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 @
d9b64028
...
@@ -183,11 +183,15 @@ func (key *pKey) VerifyPKCS1v15(method Method, data, sig []byte) error {
...
@@ -183,11 +183,15 @@ func (key *pKey) VerifyPKCS1v15(method Method, data, sig []byte) error {
ctx
:=
C
.
X_EVP_MD_CTX_new
()
ctx
:=
C
.
X_EVP_MD_CTX_new
()
defer
C
.
X_EVP_MD_CTX_free
(
ctx
)
defer
C
.
X_EVP_MD_CTX_free
(
ctx
)
if
len
(
sig
)
==
0
{
return
errors
.
New
(
"verifypkcs1v15: 0-length sig"
)
}
if
key
.
KeyType
()
==
KeyTypeED25519
{
if
key
.
KeyType
()
==
KeyTypeED25519
{
// do ED specific one-shot sign
// do ED specific one-shot sign
if
method
!=
nil
||
len
(
data
)
==
0
||
len
(
sig
)
==
0
{
if
method
!=
nil
||
len
(
data
)
==
0
{
return
errors
.
New
(
"verifypkcs1v15: 0-length data or
sig or
non-null digest"
)
return
errors
.
New
(
"verifypkcs1v15: 0-length data or non-null digest"
)
}
}
if
1
!=
C
.
X_EVP_DigestVerifyInit
(
ctx
,
nil
,
nil
,
nil
,
key
.
key
)
{
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