Branch Coverage

inc/CryptX_PK_X25519.xs.inc
Criterion Covered Total %
branch 0 72 0.0


line true false branch
11 0 0 if (!RETVAL) croak("FATAL: Newz failed");
14 0 0 if (RETVAL->pindex == -1) {
19 0 0 if (rv != CRYPT_OK) {
34 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_make_key failed: %s", error_to_string(rv));
36 0 0 XPUSHs(ST(0)); /* return self */
50 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_import failed: %s", error_to_string(rv));
52 0 0 XPUSHs(ST(0)); /* return self */
66 0 0 if (SvOK(passwd)) {
72 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_import_pkcs8 failed: %s", error_to_string(rv));
74 0 0 XPUSHs(ST(0)); /* return self */
89 0 0 if (SvOK(passwd)) {
95 0 0 if (rv != CRYPT_OK) croak("FATAL: pem_decode_pkcs failed: %s", error_to_string(rv));
96 0 0 if (key_from_pem.id != LTC_PKA_X25519) croak("FATAL: pem_decode_pkcs decoded non-X25519 key");
99 0 0 XPUSHs(ST(0)); /* return self */
113 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_import_x509 failed: %s", error_to_string(rv));
115 0 0 XPUSHs(ST(0)); /* return self */
126 0 0 if (SvOK(key)) {
130 0 0 if (which == 0) {
133 0 0 else if (which == 1) {
139 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_import_raw failed: %s", error_to_string(rv));
141 0 0 XPUSHs(ST(0)); /* return self */
147 0 0 if (self->initialized == 0) XSRETURN_UNDEF;
148 0 0 RETVAL = (self->key.type == PK_PRIVATE) ? 1 : 0;
161 0 0 if (self->initialized == 0) XSRETURN_UNDEF;
164 0 0 if (self->key.type == PK_PRIVATE) {
167 0 0 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
176 0 0 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
194 0 0 if (strnEQ(type, "private", 7)) {
196 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_export(PK_PRIVATE|PK_STD) failed: %s", error_to_string(rv));
199 0 0 else if (strnEQ(type, "public", 6)) {
201 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_export(PK_PUBLIC|PK_STD) failed: %s", error_to_string(rv));
220 0 0 if (strnEQ(type, "private", 7)) {
222 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_export(PK_PRIVATE) failed: %s", error_to_string(rv));
225 0 0 else if (strnEQ(type, "public", 6)) {
227 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_export(PK_PUBLIC) failed: %s", error_to_string(rv));
246 0 0 if (rv != CRYPT_OK) croak("FATAL: x25519_shared_secret failed: %s", error_to_string(rv));