-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
715d20d
commit 9a4f793
Showing
3 changed files
with
213 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module tests.selftest; | ||
|
||
import core.stdc.stdio; | ||
import core.stdc.string; | ||
import bindbc.gnutls; | ||
import tests._loader; | ||
|
||
extern (C) int main() | ||
{ | ||
loadLib(); | ||
assert(0 == gnutls_cipher_self_test(0, gnutls_cipher_algorithm.GNUTLS_CIPHER_AES_256_CCM)); | ||
assert(0 == gnutls_mac_self_test(0, gnutls_mac_algorithm_t.GNUTLS_MAC_SHA256)); | ||
assert(0 == gnutls_digest_self_test(0, gnutls_digest_algorithm_t.GNUTLS_DIG_SHA256)); | ||
assert(0 == gnutls_pk_self_test(0, gnutls_pk_algorithm_t.GNUTLS_PK_ECDSA)); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/// Test that some global symbols are bounded correctly | ||
module tests.symbols; | ||
|
||
import core.stdc.stdio; | ||
import core.stdc.string; | ||
import bindbc.gnutls; | ||
import tests._loader; | ||
|
||
extern (C) int main() | ||
{ | ||
loadLib(); | ||
printf("gnutls_ffdhe_2048_key_bits: %d\n", gnutls_ffdhe_2048_key_bits); | ||
assert(gnutls_ffdhe_2048_key_bits == 256); | ||
void* mem = gnutls_malloc(1024); | ||
assert(mem); | ||
gnutls_free(mem); | ||
return 0; | ||
} |