Branch Coverage

inc/CryptX_PK_Ed25519.xs.inc
Criterion Covered Total %
branch 22 84 26.1


line true false branch
11 0 1 if (!RETVAL) croak("FATAL: Newz failed");
14 0 1 if (RETVAL->pindex == -1) {
19 0 1 if (rv != CRYPT_OK) {
34 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_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: ed25519_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: ed25519_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_ED25519) croak("FATAL: pem_decode_pkcs decoded non-Ed25519 key");
99 0 0 XPUSHs(ST(0)); /* return self */
114 1 2 if (SvOK(passwd)) {
120 0 3 if (rv != CRYPT_OK) croak("FATAL: pem_decode_openssh failed: %s", error_to_string(rv));
121 0 3 if (key_from_pem.id != LTC_PKA_ED25519) croak("FATAL: pem_decode_openssh decoded non-Ed25519 key");
124 0 3 XPUSHs(ST(0)); /* return self */
138 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_import_x509 failed: %s", error_to_string(rv));
140 0 0 XPUSHs(ST(0)); /* return self */
151 3 0 if (SvOK(key)) {
155 2 1 if (which == 0) {
158 1 0 else if (which == 1) {
164 0 3 if (rv != CRYPT_OK) croak("FATAL: ed25519_import_raw failed: %s", error_to_string(rv));
166 0 3 XPUSHs(ST(0)); /* return self */
172 0 6 if (self->initialized == 0) XSRETURN_UNDEF;
173 4 2 RETVAL = (self->key.type == PK_PRIVATE) ? 1 : 0;
186 0 8 if (self->initialized == 0) XSRETURN_UNDEF;
189 4 4 if (self->key.type == PK_PRIVATE) {
192 0 4 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
201 0 8 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
219 0 0 if (strnEQ(type, "private", 7)) {
221 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_export(PK_PRIVATE|PK_STD) failed: %s", error_to_string(rv));
224 0 0 else if (strnEQ(type, "public", 6)) {
226 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_export(PK_PUBLIC|PK_STD) failed: %s", error_to_string(rv));
245 0 0 if (strnEQ(type, "private", 7)) {
247 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_export(PK_PRIVATE) failed: %s", error_to_string(rv));
250 0 0 else if (strnEQ(type, "public", 6)) {
252 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_export(PK_PUBLIC) failed: %s", error_to_string(rv));
273 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_sign failed: %s", error_to_string(rv));
292 0 0 if (rv == CRYPT_OK && stat == 1) RETVAL = 1;
0 0 if (rv == CRYPT_OK && stat == 1) RETVAL = 1;