Branch Coverage

inc/CryptX_PK_Ed25519.xs.inc
Criterion Covered Total %
branch 24 84 28.5


line true false branch
11 0 2 if (!RETVAL) croak("FATAL: Newz failed");
15 0 2 if (RETVAL->pindex == -1) {
20 0 2 if (rv != CRYPT_OK) {
36 0 1 if (rv != CRYPT_OK) croak("FATAL: ed25519_make_key failed: %s", error_to_string(rv));
38 0 1 XPUSHs(ST(0)); /* return self */
52 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_import failed: %s", error_to_string(rv));
54 0 0 XPUSHs(ST(0)); /* return self */
68 0 0 if (SvOK(passwd)) {
74 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_import_pkcs8 failed: %s", error_to_string(rv));
76 0 0 XPUSHs(ST(0)); /* return self */
91 0 0 if (SvOK(passwd)) {
97 0 0 if (rv != CRYPT_OK) croak("FATAL: pem_decode_pkcs failed: %s", error_to_string(rv));
98 0 0 if (key_from_pem.id != LTC_PKA_ED25519) croak("FATAL: pem_decode_pkcs decoded non-Ed25519 key");
101 0 0 XPUSHs(ST(0)); /* return self */
116 1 2 if (SvOK(passwd)) {
122 0 3 if (rv != CRYPT_OK) croak("FATAL: pem_decode_openssh failed: %s", error_to_string(rv));
123 0 3 if (key_from_pem.id != LTC_PKA_ED25519) croak("FATAL: pem_decode_openssh decoded non-Ed25519 key");
126 0 3 XPUSHs(ST(0)); /* return self */
140 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_import_x509 failed: %s", error_to_string(rv));
142 0 0 XPUSHs(ST(0)); /* return self */
153 3 0 if (SvOK(key)) {
157 2 1 if (which == 0) {
160 1 0 else if (which == 1) {
166 0 3 if (rv != CRYPT_OK) croak("FATAL: ed25519_import_raw failed: %s", error_to_string(rv));
168 0 3 XPUSHs(ST(0)); /* return self */
174 0 6 if (self->initialized == 0) XSRETURN_UNDEF;
175 4 2 RETVAL = (self->key.type == PK_PRIVATE) ? 1 : 0;
188 0 9 if (self->initialized == 0) XSRETURN_UNDEF;
191 5 4 if (self->key.type == PK_PRIVATE) {
194 0 5 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
203 0 9 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
221 0 0 if (strnEQ(type, "private", 7)) {
223 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_export(PK_PRIVATE|PK_STD) failed: %s", error_to_string(rv));
226 0 0 else if (strnEQ(type, "public", 6)) {
228 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_export(PK_PUBLIC|PK_STD) failed: %s", error_to_string(rv));
247 0 0 if (strnEQ(type, "private", 7)) {
249 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_export(PK_PRIVATE) failed: %s", error_to_string(rv));
252 0 0 else if (strnEQ(type, "public", 6)) {
254 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_export(PK_PUBLIC) failed: %s", error_to_string(rv));
275 0 0 if (rv != CRYPT_OK) croak("FATAL: ed25519_sign failed: %s", error_to_string(rv));
294 0 0 if (rv == CRYPT_OK && stat == 1) RETVAL = 1;
0 0 if (rv == CRYPT_OK && stat == 1) RETVAL = 1;