-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-add EdDSA support + static libsodium #67
Conversation
Release 1.0.11, commit 2f4f718cd94adab547c210a78050762cf667dfca.
😡 I will work around this. |
2.65 is ancient. Good old RHEL! |
#include "constants.h" | ||
|
||
size_t tinfoil_sodium_pubkey_len() { | ||
return crypto_sign_PUBLICKEYBYTES; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need void
in the (empty) parameter list when doing C.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep thanks, I thought I'd fixed that here but must have missed a few functions.
#include <sodium.h> | ||
|
||
size_t tinfoil_sodium_pubkey_len(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above.
@@ -154,7 +163,7 @@ benchmark bench | |||
|
|||
main-is: bench.hs | |||
|
|||
ghc-options: -Wall -threaded -O2 | |||
ghc-options: -Wall -threaded -O2 -pgml ./bin/salted-gcc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want -Wextra
there as well just to see the extra warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-Wextra for the C code right? You're right, but shouldn't it go in cc-opts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, misread that, but -Wextra
for the C code, always :).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, added, annoyed I didn't have it on from the start.
{-# LANGUAGE OverloadedStrings #-} | ||
{-# LANGUAGE TemplateHaskell #-} | ||
{-# LANGUAGE GADTs #-} | ||
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you actually have signatures for everything, maybe worth dropping -fno-warn-missing-signatures
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
Totally gnored the libsodium code. Making sure empty parameter lists for C functions are specified as 👍 in C parameter lists and |
On of the nasty little differences between C and C++ : http://stackoverflow.com/questions/416345/is-fvoid-deprecated-in-modern-c-and-c |
Yeah, I remember that one, you explained it to me a while back (I think in another project) - I think I did the initial version of the bindings before that and forgot to come back and fix it. |
Setup.hs looks good to me No opinion on the giant subtree |
lib/libsodium
doesn't need review at the moment; just the Haskell and tinfoil's own cbits - everything's in c0051c5.The only functional change in this PR (measured from before Ed25519 support was removed) is a libsodium version upgrade.
! @novemberkilo @erikd-ambiata @thumphries