Skip to content
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

Fix a few FFI bindings #17

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions botan-bindings/src/Botan/Bindings/PubKey.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,15 @@ foreign import capi safe "botan/ffi.h botan_privkey_view_der"
botan_privkey_view_der
:: BotanPrivKey -- ^ __key__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewBinCallback ctx) -- ^ __view__
-> BotanViewBinCallback ctx -- ^ __view__
-> IO CInt

-- | View the private key's PEM encoding
foreign import capi safe "botan/ffi.h botan_privkey_view_pem"
botan_privkey_view_pem
:: BotanPrivKey -- ^ __key__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewStrCallback ctx) -- ^ __view__
-> BotanViewStrCallback ctx -- ^ __view__
-> IO CInt

foreign import capi safe "botan/ffi.h botan_privkey_algo_name"
Expand Down Expand Up @@ -347,7 +347,7 @@ foreign import capi safe "botan/ffi.h botan_privkey_view_encrypted_der"
-> ConstPtr CChar -- ^ __pbkdf_algo__
-> CSize -- ^ __pbkdf_iterations__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewBinCallback ctx) -- ^ __view__
-> BotanViewBinCallback ctx -- ^ __view__
-> IO CInt

{- |
Expand All @@ -364,7 +364,7 @@ foreign import capi safe "botan/ffi.h botan_privkey_view_encrypted_der_timed"
-> ConstPtr CChar -- ^ __pbkdf_algo__
-> CSize -- ^ __pbkdf_runtime_msec__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewBinCallback ctx) -- ^ __view__
-> BotanViewBinCallback ctx -- ^ __view__
-> IO CInt

{- |
Expand All @@ -382,7 +382,7 @@ foreign import capi safe "botan/ffi.h botan_privkey_view_encrypted_pem"
-> ConstPtr CChar -- ^ __pbkdf_algo__
-> CSize -- ^ __pbkdf_iterations__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewStrCallback ctx) -- ^ __view__
-> BotanViewStrCallback ctx -- ^ __view__
-> IO CInt

{- |
Expand All @@ -399,7 +399,7 @@ foreign import capi safe "botan/ffi.h botan_privkey_view_encrypted_pem_timed"
-> ConstPtr CChar -- ^ __pbkdf_algo__
-> CSize -- ^ __pbkdf_runtime_msec__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewStrCallback ctx) -- ^ __view__
-> BotanViewStrCallback ctx -- ^ __view__
-> IO CInt

foreign import capi safe "botan/ffi.h botan_privkey_get_field"
Expand Down Expand Up @@ -455,15 +455,15 @@ foreign import capi safe "botan/ffi.h botan_pubkey_view_der"
botan_pubkey_view_der
:: BotanPubKey -- ^ __key__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewBinCallback ctx) -- ^ __view__
-> BotanViewBinCallback ctx -- ^ __view__
-> IO CInt

-- | View the public key's PEM encoding
foreign import capi safe "botan/ffi.h botan_pubkey_view_pem"
botan_pubkey_view_pem
:: BotanPubKey -- ^ __key__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewStrCallback ctx) -- ^ __view__
-> BotanViewStrCallback ctx -- ^ __view__
-> IO CInt

foreign import capi safe "botan/ffi.h botan_pubkey_algo_name"
Expand Down Expand Up @@ -508,5 +508,5 @@ foreign import capi safe "botan/ffi.h botan_pubkey_view_ec_public_point"
botan_pubkey_view_ec_public_point
:: BotanPubKey -- ^ __key__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewBinCallback ctx) -- ^ __view__
-> BotanViewBinCallback ctx -- ^ __view__
-> IO CInt
2 changes: 1 addition & 1 deletion botan-bindings/src/Botan/Bindings/PubKey/KeyAgreement.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ foreign import capi safe "botan/ffi.h botan_pk_op_key_agreement_view_public"
botan_pk_op_key_agreement_view_public
:: BotanPrivKey -- ^ __key__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewBinCallback ctx) -- ^ __view__
-> BotanViewBinCallback ctx -- ^ __view__
-> IO CInt

foreign import capi safe "botan/ffi.h botan_pk_op_key_agreement_size"
Expand Down
4 changes: 2 additions & 2 deletions botan-bindings/src/Botan/Bindings/X509.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ foreign import capi safe "botan/ffi.h botan_x509_cert_view_public_key_bits"
botan_x509_cert_view_public_key_bits
:: BotanX509Cert -- ^ __cert__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewBinCallback ctx) -- ^ __view__
-> BotanViewBinCallback ctx -- ^ __view__
-> IO CInt

foreign import capi safe "botan/ffi.h botan_x509_cert_get_public_key"
Expand Down Expand Up @@ -164,7 +164,7 @@ foreign import capi safe "botan/ffi.h botan_x509_cert_view_as_string"
botan_x509_cert_view_as_string
:: BotanX509Cert -- ^ __cert__
-> BotanViewContext ctx -- ^ __ctx__
-> FunPtr (BotanViewStrCallback ctx) -- ^ __view__
-> BotanViewStrCallback ctx -- ^ __view__
-> IO CInt

pattern NO_CONSTRAINTS
Expand Down
Loading