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
a66df3e4
Commit
a66df3e4
authored
Sep 13, 2018
by
Jeff Wendling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change ulong to size_t to match shim.h
parent
6db44337
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
key.go
key.go
+4
-4
No files found.
key.go
View file @
a66df3e4
...
...
@@ -135,12 +135,12 @@ func (key *pKey) SignPKCS1v15(method Method, data []byte) ([]byte, error) {
// evp signatures are 64 bytes
sig
:=
make
([]
byte
,
64
,
64
)
var
sigblen
C
.
ulong
=
64
var
sigblen
C
.
size_t
=
64
if
1
!=
C
.
X_EVP_DigestSign
(
ctx
,
((
*
C
.
uchar
)(
unsafe
.
Pointer
(
&
sig
[
0
]))),
&
sigblen
,
(
*
C
.
uchar
)(
unsafe
.
Pointer
(
&
data
[
0
])),
C
.
ulong
(
len
(
data
)))
{
C
.
size_t
(
len
(
data
)))
{
return
nil
,
errors
.
New
(
"signpkcs1v15: failed to do one-shot signature"
)
}
...
...
@@ -182,9 +182,9 @@ func (key *pKey) VerifyPKCS1v15(method Method, data, sig []byte) error {
if
1
!=
C
.
X_EVP_DigestVerify
(
ctx
,
((
*
C
.
uchar
)(
unsafe
.
Pointer
(
&
sig
[
0
]))),
C
.
ulong
(
len
(
sig
)),
C
.
size_t
(
len
(
sig
)),
(
*
C
.
uchar
)(
unsafe
.
Pointer
(
&
data
[
0
])),
C
.
ulong
(
len
(
data
)))
{
C
.
size_t
(
len
(
data
)))
{
return
errors
.
New
(
"verifypkcs1v15: failed to do one-shot verify"
)
}
...
...
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