| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | | - |
| 27 | | - |
| 28 | | - |
| 29 | | - |
| 30 | | - |
| 31 | | - |
| 32 | | - |
| 33 | | - |
| 34 | | - |
| 35 | | - |
| 36 | | - |
| 37 | | - |
| 38 | | - |
| 39 | | - |
| 40 | | - |
| 41 | | - |
| 42 | | - |
| 43 | | - |
| 44 | | - |
| 45 | | - |
| 46 | | - |
| 47 | | - |
| 48 | | - |
| 49 | | - |
| 50 | | - |
| 51 | | - |
| 52 | | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | | - |
| 58 | | - |
| 59 | #include <stdio.h> | - |
| 60 | #include <string.h> | - |
| 61 | | - |
| 62 | #include <openssl/err.h> | - |
| 63 | #include <openssl/buffer.h> | - |
| 64 | #include <openssl/lhash.h> | - |
| 65 | #include <openssl/objects.h> | - |
| 66 | | - |
| 67 | ASN1_OBJECT * | - |
| 68 | OBJ_dup(const ASN1_OBJECT *o) | - |
| 69 | { | - |
| 70 | ASN1_OBJECT *r; | - |
| 71 | char *ln = NULL, *sn = NULL; | - |
| 72 | unsigned char *data = NULL; | - |
| 73 | | - |
| 74 | if (o == NULL)| TRUE | never evaluated | | FALSE | evaluated 1890 times by 8 testsEvaluated by:- asn1test
- keypairtest
- libcrypto.so.44.0.1
- pkcs7test
- servertest
- ssltest
- tlstest
- verifytest
|
| 0-1890 |
| 75 | return (NULL); never executed: return ( ((void *)0) ); | 0 |
| 76 | if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC))| TRUE | evaluated 46 times by 2 testsEvaluated by:- libcrypto.so.44.0.1
- verifytest
| | FALSE | evaluated 1844 times by 8 testsEvaluated by:- asn1test
- keypairtest
- libcrypto.so.44.0.1
- pkcs7test
- servertest
- ssltest
- tlstest
- verifytest
|
| 46-1844 |
| 77 | return((ASN1_OBJECT *)o); executed 46 times by 2 tests: return((ASN1_OBJECT *)o);Executed by:- libcrypto.so.44.0.1
- verifytest
| 46 |
| 78 | | - |
| 79 | | - |
| 80 | r = ASN1_OBJECT_new(); | - |
| 81 | if (r == NULL) {| TRUE | never evaluated | | FALSE | evaluated 1844 times by 8 testsEvaluated by:- asn1test
- keypairtest
- libcrypto.so.44.0.1
- pkcs7test
- servertest
- ssltest
- tlstest
- verifytest
|
| 0-1844 |
| 82 | OBJerror(ERR_R_ASN1_LIB); | - |
| 83 | return (NULL); never executed: return ( ((void *)0) ); | 0 |
| 84 | } | - |
| 85 | data = malloc(o->length); | - |
| 86 | if (data == NULL)| TRUE | never evaluated | | FALSE | evaluated 1844 times by 8 testsEvaluated by:- asn1test
- keypairtest
- libcrypto.so.44.0.1
- pkcs7test
- servertest
- ssltest
- tlstest
- verifytest
|
| 0-1844 |
| 87 | goto err; never executed: goto err; | 0 |
| 88 | if (o->data != NULL)| TRUE | evaluated 1844 times by 8 testsEvaluated by:- asn1test
- keypairtest
- libcrypto.so.44.0.1
- pkcs7test
- servertest
- ssltest
- tlstest
- verifytest
| | FALSE | never evaluated |
| 0-1844 |
| 89 | memcpy(data, o->data, o->length);executed 1844 times by 8 tests: memcpy(data, o->data, o->length);Executed by:- asn1test
- keypairtest
- libcrypto.so.44.0.1
- pkcs7test
- servertest
- ssltest
- tlstest
- verifytest
| 1844 |
| 90 | | - |
| 91 | r->data = data; | - |
| 92 | r->length = o->length; | - |
| 93 | r->nid = o->nid; | - |
| 94 | r->ln = r->sn = NULL; | - |
| 95 | if (o->ln != NULL) {| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 1838 times by 8 testsEvaluated by:- asn1test
- keypairtest
- libcrypto.so.44.0.1
- pkcs7test
- servertest
- ssltest
- tlstest
- verifytest
|
| 6-1838 |
| 96 | ln = strdup(o->ln); never executed: __retval = (char *) memcpy (__retval, o->ln , __len); | TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 6 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-6 |
| 97 | if (ln == NULL)| TRUE | never evaluated | | FALSE | evaluated 6 times by 1 test |
| 0-6 |
| 98 | goto err; never executed: goto err; | 0 |
| 99 | r->ln = ln; | - |
| 100 | }executed 6 times by 1 test: end of block | 6 |
| 101 | | - |
| 102 | if (o->sn != NULL) {| TRUE | evaluated 6 times by 1 test | | FALSE | evaluated 1838 times by 8 testsEvaluated by:- asn1test
- keypairtest
- libcrypto.so.44.0.1
- pkcs7test
- servertest
- ssltest
- tlstest
- verifytest
|
| 6-1838 |
| 103 | sn = strdup(o->sn); never executed: __retval = (char *) memcpy (__retval, o->sn , __len); | TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | evaluated 6 times by 1 test |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0-6 |
| 104 | if (sn == NULL)| TRUE | never evaluated | | FALSE | evaluated 6 times by 1 test |
| 0-6 |
| 105 | goto err; never executed: goto err; | 0 |
| 106 | r->sn = sn; | - |
| 107 | }executed 6 times by 1 test: end of block | 6 |
| 108 | r->flags = o->flags | (ASN1_OBJECT_FLAG_DYNAMIC | | - |
| 109 | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS | ASN1_OBJECT_FLAG_DYNAMIC_DATA); | - |
| 110 | return (r);executed 1844 times by 8 tests: return (r);Executed by:- asn1test
- keypairtest
- libcrypto.so.44.0.1
- pkcs7test
- servertest
- ssltest
- tlstest
- verifytest
| 1844 |
| 111 | | - |
| 112 | err: | - |
| 113 | OBJerror(ERR_R_MALLOC_FAILURE); | - |
| 114 | free(ln); | - |
| 115 | free(sn); | - |
| 116 | free(data); | - |
| 117 | free(r); | - |
| 118 | return (NULL); never executed: return ( ((void *)0) ); | 0 |
| 119 | } | - |
| 120 | | - |
| 121 | int | - |
| 122 | OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b) | - |
| 123 | { | - |
| 124 | int ret; | - |
| 125 | | - |
| 126 | ret = (a->length - b->length); | - |
| 127 | if (ret)| TRUE | never evaluated | | FALSE | evaluated 112 times by 4 testsEvaluated by:- pkcs7test
- ssltest
- tlstest
- verifytest
|
| 0-112 |
| 128 | return (ret); never executed: return (ret); | 0 |
| 129 | return (memcmp(a->data, b->data, a->length));executed 112 times by 4 tests: return (memcmp(a->data, b->data, a->length));Executed by:- pkcs7test
- ssltest
- tlstest
- verifytest
| 112 |
| 130 | } | - |
| | |