| 57 | } |
| 58 | |
| 59 | int byte_array_init(ByteArray* arr, const uint8_t* data, int len) |
| 60 | { |
| 61 | if (len == 0) { |
| 62 | arr->data = NULL; |
| 63 | arr->len = 0; |
| 64 | return 0; |
| 65 | } |
| 66 | |
| 67 | arr->data = (uint8_t*)malloc(len); |
| 68 | if (!arr->data) |
| 69 | return -1; |
| 70 | |
| 71 | arr->len = len; |
| 72 | memcpy(arr->data, data, len); |
| 73 | return 0; |
| 74 | } |
| 75 | |
| 76 | time_t ASN1_TIME_to_time_t(const ASN1_TIME* time) |
| 77 | { |
no outgoing calls
no test coverage detected