| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/engine/eng_openssl.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | - | |||||||||||||
| 8 | static int openssl_destroy(ENGINE *e); | - | ||||||||||||
| 9 | - | |||||||||||||
| 10 | - | |||||||||||||
| 11 | static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | - | ||||||||||||
| 12 | const int **nids, int nid); | - | ||||||||||||
| 13 | - | |||||||||||||
| 14 | - | |||||||||||||
| 15 | static int openssl_digests(ENGINE *e, const EVP_MD **digest, | - | ||||||||||||
| 16 | const int **nids, int nid); | - | ||||||||||||
| 17 | - | |||||||||||||
| 18 | - | |||||||||||||
| 19 | - | |||||||||||||
| 20 | static EVP_PKEY *openssl_load_privkey(ENGINE *eng, const char *key_id, | - | ||||||||||||
| 21 | UI_METHOD *ui_method, | - | ||||||||||||
| 22 | void *callback_data); | - | ||||||||||||
| 23 | static const char *engine_openssl_id = "openssl"; | - | ||||||||||||
| 24 | static const char *engine_openssl_name = "Software engine support"; | - | ||||||||||||
| 25 | - | |||||||||||||
| 26 | - | |||||||||||||
| 27 | - | |||||||||||||
| 28 | - | |||||||||||||
| 29 | - | |||||||||||||
| 30 | static int bind_helper(ENGINE *e) | - | ||||||||||||
| 31 | { | - | ||||||||||||
| 32 | if (!ENGINE_set_id(e, engine_openssl_id)
| 0 | ||||||||||||
| 33 | || !ENGINE_set_name(e, engine_openssl_name)
| 0 | ||||||||||||
| 34 | || !ENGINE_set_destroy_function(e, openssl_destroy)
| 0 | ||||||||||||
| 35 | - | |||||||||||||
| 36 | - | |||||||||||||
| 37 | || !ENGINE_set_RSA(e, RSA_get_default_method())
| 0 | ||||||||||||
| 38 | - | |||||||||||||
| 39 | - | |||||||||||||
| 40 | || !ENGINE_set_DSA(e, DSA_get_default_method())
| 0 | ||||||||||||
| 41 | - | |||||||||||||
| 42 | - | |||||||||||||
| 43 | || !ENGINE_set_EC(e, EC_KEY_OpenSSL())
| 0 | ||||||||||||
| 44 | - | |||||||||||||
| 45 | - | |||||||||||||
| 46 | || !ENGINE_set_DH(e, DH_get_default_method())
| 0 | ||||||||||||
| 47 | - | |||||||||||||
| 48 | || !ENGINE_set_RAND(e, RAND_OpenSSL())
| 0 | ||||||||||||
| 49 | - | |||||||||||||
| 50 | || !ENGINE_set_ciphers(e, openssl_ciphers)
| 0 | ||||||||||||
| 51 | - | |||||||||||||
| 52 | - | |||||||||||||
| 53 | || !ENGINE_set_digests(e, openssl_digests)
| 0 | ||||||||||||
| 54 | - | |||||||||||||
| 55 | - | |||||||||||||
| 56 | - | |||||||||||||
| 57 | || !ENGINE_set_load_privkey_function(e, openssl_load_privkey)
| 0 | ||||||||||||
| 58 | - | |||||||||||||
| 59 | - | |||||||||||||
| 60 | - | |||||||||||||
| 61 | - | |||||||||||||
| 62 | - | |||||||||||||
| 63 | ) | - | ||||||||||||
| 64 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 65 | - | |||||||||||||
| 66 | - | |||||||||||||
| 67 | - | |||||||||||||
| 68 | - | |||||||||||||
| 69 | - | |||||||||||||
| 70 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 71 | } | - | ||||||||||||
| 72 | - | |||||||||||||
| 73 | static ENGINE *engine_openssl(void) | - | ||||||||||||
| 74 | { | - | ||||||||||||
| 75 | ENGINE *ret = ENGINE_new(); | - | ||||||||||||
| 76 | if (ret ==
| 0 | ||||||||||||
| 77 | ((void *)0)
| 0 | ||||||||||||
| 78 | ) | - | ||||||||||||
| 79 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 80 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 81 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 82 | if (!bind_helper(ret)
| 0 | ||||||||||||
| 83 | ENGINE_free(ret); | - | ||||||||||||
| 84 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 85 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 86 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 87 | } | - | ||||||||||||
| 88 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||
| 89 | } | - | ||||||||||||
| 90 | - | |||||||||||||
| 91 | void engine_load_openssl_int(void) | - | ||||||||||||
| 92 | { | - | ||||||||||||
| 93 | ENGINE *toadd = engine_openssl(); | - | ||||||||||||
| 94 | if (!toadd
| 0 | ||||||||||||
| 95 | return; never executed: return; | 0 | ||||||||||||
| 96 | ENGINE_add(toadd); | - | ||||||||||||
| 97 | - | |||||||||||||
| 98 | - | |||||||||||||
| 99 | - | |||||||||||||
| 100 | - | |||||||||||||
| 101 | ENGINE_free(toadd); | - | ||||||||||||
| 102 | ERR_clear_error(); | - | ||||||||||||
| 103 | } never executed: end of block | 0 | ||||||||||||
| 104 | - | |||||||||||||
| 105 | typedef struct { | - | ||||||||||||
| 106 | unsigned char key[16]; | - | ||||||||||||
| 107 | RC4_KEY ks; | - | ||||||||||||
| 108 | } TEST_RC4_KEY; | - | ||||||||||||
| 109 | - | |||||||||||||
| 110 | static int test_rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | - | ||||||||||||
| 111 | const unsigned char *iv, int enc) | - | ||||||||||||
| 112 | { | - | ||||||||||||
| 113 | - | |||||||||||||
| 114 | fprintf( | - | ||||||||||||
| 115 | stderr | - | ||||||||||||
| 116 | , "(TEST_ENG_OPENSSL_RC4) test_init_key() called\n"); | - | ||||||||||||
| 117 | - | |||||||||||||
| 118 | memcpy(&((TEST_RC4_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->key[0], key, EVP_CIPHER_CTX_key_length(ctx)); | - | ||||||||||||
| 119 | RC4_set_key(&((TEST_RC4_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_key_length(ctx), | - | ||||||||||||
| 120 | ((TEST_RC4_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->key); | - | ||||||||||||
| 121 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 122 | } | - | ||||||||||||
| 123 | - | |||||||||||||
| 124 | static int test_rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | - | ||||||||||||
| 125 | const unsigned char *in, size_t inl) | - | ||||||||||||
| 126 | { | - | ||||||||||||
| 127 | - | |||||||||||||
| 128 | - | |||||||||||||
| 129 | - | |||||||||||||
| 130 | RC4(&((TEST_RC4_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, inl, in, out); | - | ||||||||||||
| 131 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 132 | } | - | ||||||||||||
| 133 | - | |||||||||||||
| 134 | static EVP_CIPHER *r4_cipher = | - | ||||||||||||
| 135 | ((void *)0) | - | ||||||||||||
| 136 | ; | - | ||||||||||||
| 137 | static const EVP_CIPHER *test_r4_cipher(void) | - | ||||||||||||
| 138 | { | - | ||||||||||||
| 139 | if (r4_cipher ==
| 0 | ||||||||||||
| 140 | ((void *)0)
| 0 | ||||||||||||
| 141 | ) { | - | ||||||||||||
| 142 | EVP_CIPHER *cipher; | - | ||||||||||||
| 143 | - | |||||||||||||
| 144 | if ((
| 0 | ||||||||||||
| 145 | ((void *)0)
| 0 | ||||||||||||
| 146 | - | |||||||||||||
| 147 | || !EVP_CIPHER_meth_set_iv_length(cipher, 0)
| 0 | ||||||||||||
| 148 | || !EVP_CIPHER_meth_set_flags(cipher, 0x8)
| 0 | ||||||||||||
| 149 | || !EVP_CIPHER_meth_set_init(cipher, test_rc4_init_key)
| 0 | ||||||||||||
| 150 | || !EVP_CIPHER_meth_set_do_cipher(cipher, test_rc4_cipher)
| 0 | ||||||||||||
| 151 | || !EVP_CIPHER_meth_set_impl_ctx_size(cipher, sizeof(TEST_RC4_KEY))
| 0 | ||||||||||||
| 152 | EVP_CIPHER_meth_free(cipher); | - | ||||||||||||
| 153 | cipher = | - | ||||||||||||
| 154 | ((void *)0) | - | ||||||||||||
| 155 | ; | - | ||||||||||||
| 156 | } never executed: end of block | 0 | ||||||||||||
| 157 | r4_cipher = cipher; | - | ||||||||||||
| 158 | } never executed: end of block | 0 | ||||||||||||
| 159 | return never executed: r4_cipher;return r4_cipher;never executed: return r4_cipher; | 0 | ||||||||||||
| 160 | } | - | ||||||||||||
| 161 | static void test_r4_cipher_destroy(void) | - | ||||||||||||
| 162 | { | - | ||||||||||||
| 163 | EVP_CIPHER_meth_free(r4_cipher); | - | ||||||||||||
| 164 | r4_cipher = | - | ||||||||||||
| 165 | ((void *)0) | - | ||||||||||||
| 166 | ; | - | ||||||||||||
| 167 | } never executed: end of block | 0 | ||||||||||||
| 168 | - | |||||||||||||
| 169 | static EVP_CIPHER *r4_40_cipher = | - | ||||||||||||
| 170 | ((void *)0) | - | ||||||||||||
| 171 | ; | - | ||||||||||||
| 172 | static const EVP_CIPHER *test_r4_40_cipher(void) | - | ||||||||||||
| 173 | { | - | ||||||||||||
| 174 | if (r4_40_cipher ==
| 0 | ||||||||||||
| 175 | ((void *)0)
| 0 | ||||||||||||
| 176 | ) { | - | ||||||||||||
| 177 | EVP_CIPHER *cipher; | - | ||||||||||||
| 178 | - | |||||||||||||
| 179 | if ((
| 0 | ||||||||||||
| 180 | ((void *)0)
| 0 | ||||||||||||
| 181 | - | |||||||||||||
| 182 | || !EVP_CIPHER_meth_set_iv_length(cipher, 0)
| 0 | ||||||||||||
| 183 | || !EVP_CIPHER_meth_set_flags(cipher, 0x8)
| 0 | ||||||||||||
| 184 | || !EVP_CIPHER_meth_set_init(cipher, test_rc4_init_key)
| 0 | ||||||||||||
| 185 | || !EVP_CIPHER_meth_set_do_cipher(cipher, test_rc4_cipher)
| 0 | ||||||||||||
| 186 | || !EVP_CIPHER_meth_set_impl_ctx_size(cipher, sizeof(TEST_RC4_KEY))
| 0 | ||||||||||||
| 187 | EVP_CIPHER_meth_free(cipher); | - | ||||||||||||
| 188 | cipher = | - | ||||||||||||
| 189 | ((void *)0) | - | ||||||||||||
| 190 | ; | - | ||||||||||||
| 191 | } never executed: end of block | 0 | ||||||||||||
| 192 | r4_40_cipher = cipher; | - | ||||||||||||
| 193 | } never executed: end of block | 0 | ||||||||||||
| 194 | return never executed: r4_40_cipher;return r4_40_cipher;never executed: return r4_40_cipher; | 0 | ||||||||||||
| 195 | } | - | ||||||||||||
| 196 | static void test_r4_40_cipher_destroy(void) | - | ||||||||||||
| 197 | { | - | ||||||||||||
| 198 | EVP_CIPHER_meth_free(r4_40_cipher); | - | ||||||||||||
| 199 | r4_40_cipher = | - | ||||||||||||
| 200 | ((void *)0) | - | ||||||||||||
| 201 | ; | - | ||||||||||||
| 202 | } never executed: end of block | 0 | ||||||||||||
| 203 | static int test_cipher_nids(const int **nids) | - | ||||||||||||
| 204 | { | - | ||||||||||||
| 205 | static int cipher_nids[4] = { 0, 0, 0, 0 }; | - | ||||||||||||
| 206 | static int pos = 0; | - | ||||||||||||
| 207 | static int init = 0; | - | ||||||||||||
| 208 | - | |||||||||||||
| 209 | if (!init
| 0 | ||||||||||||
| 210 | const EVP_CIPHER *cipher; | - | ||||||||||||
| 211 | if ((
| 0 | ||||||||||||
| 212 | ((void *)0)
| 0 | ||||||||||||
| 213 | ) | - | ||||||||||||
| 214 | cipher_nids[pos++] = EVP_CIPHER_nid(cipher); never executed: cipher_nids[pos++] = EVP_CIPHER_nid(cipher); | 0 | ||||||||||||
| 215 | if ((
| 0 | ||||||||||||
| 216 | ((void *)0)
| 0 | ||||||||||||
| 217 | ) | - | ||||||||||||
| 218 | cipher_nids[pos++] = EVP_CIPHER_nid(cipher); never executed: cipher_nids[pos++] = EVP_CIPHER_nid(cipher); | 0 | ||||||||||||
| 219 | cipher_nids[pos] = 0; | - | ||||||||||||
| 220 | init = 1; | - | ||||||||||||
| 221 | } never executed: end of block | 0 | ||||||||||||
| 222 | *nids = cipher_nids; | - | ||||||||||||
| 223 | return never executed: pos;return pos;never executed: return pos; | 0 | ||||||||||||
| 224 | } | - | ||||||||||||
| 225 | - | |||||||||||||
| 226 | static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | - | ||||||||||||
| 227 | const int **nids, int nid) | - | ||||||||||||
| 228 | { | - | ||||||||||||
| 229 | if (!cipher
| 0 | ||||||||||||
| 230 | - | |||||||||||||
| 231 | return never executed: test_cipher_nids(nids);return test_cipher_nids(nids);never executed: return test_cipher_nids(nids); | 0 | ||||||||||||
| 232 | } | - | ||||||||||||
| 233 | - | |||||||||||||
| 234 | if (nid == 5
| 0 | ||||||||||||
| 235 | * never executed: cipher = test_r4_cipher();*cipher = test_r4_cipher();never executed: *cipher = test_r4_cipher(); | 0 | ||||||||||||
| 236 | else if (nid == 97
| 0 | ||||||||||||
| 237 | * never executed: cipher = test_r4_40_cipher();*cipher = test_r4_40_cipher();never executed: *cipher = test_r4_40_cipher(); | 0 | ||||||||||||
| 238 | else { | - | ||||||||||||
| 239 | - | |||||||||||||
| 240 | - | |||||||||||||
| 241 | - | |||||||||||||
| 242 | - | |||||||||||||
| 243 | *cipher = | - | ||||||||||||
| 244 | ((void *)0) | - | ||||||||||||
| 245 | ; | - | ||||||||||||
| 246 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 247 | } | - | ||||||||||||
| 248 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 249 | } | - | ||||||||||||
| 250 | - | |||||||||||||
| 251 | - | |||||||||||||
| 252 | - | |||||||||||||
| 253 | - | |||||||||||||
| 254 | - | |||||||||||||
| 255 | - | |||||||||||||
| 256 | static int test_sha1_init(EVP_MD_CTX *ctx) | - | ||||||||||||
| 257 | { | - | ||||||||||||
| 258 | - | |||||||||||||
| 259 | - | |||||||||||||
| 260 | - | |||||||||||||
| 261 | return never executed: SHA1_Init(EVP_MD_CTX_md_data(ctx));return SHA1_Init(EVP_MD_CTX_md_data(ctx));never executed: return SHA1_Init(EVP_MD_CTX_md_data(ctx)); | 0 | ||||||||||||
| 262 | } | - | ||||||||||||
| 263 | - | |||||||||||||
| 264 | static int test_sha1_update(EVP_MD_CTX *ctx, const void *data, size_t count) | - | ||||||||||||
| 265 | { | - | ||||||||||||
| 266 | - | |||||||||||||
| 267 | - | |||||||||||||
| 268 | - | |||||||||||||
| 269 | return never executed: SHA1_Update(EVP_MD_CTX_md_data(ctx), data, count);return SHA1_Update(EVP_MD_CTX_md_data(ctx), data, count);never executed: return SHA1_Update(EVP_MD_CTX_md_data(ctx), data, count); | 0 | ||||||||||||
| 270 | } | - | ||||||||||||
| 271 | - | |||||||||||||
| 272 | static int test_sha1_final(EVP_MD_CTX *ctx, unsigned char *md) | - | ||||||||||||
| 273 | { | - | ||||||||||||
| 274 | - | |||||||||||||
| 275 | - | |||||||||||||
| 276 | - | |||||||||||||
| 277 | return never executed: SHA1_Final(md, EVP_MD_CTX_md_data(ctx));return SHA1_Final(md, EVP_MD_CTX_md_data(ctx));never executed: return SHA1_Final(md, EVP_MD_CTX_md_data(ctx)); | 0 | ||||||||||||
| 278 | } | - | ||||||||||||
| 279 | - | |||||||||||||
| 280 | static EVP_MD *sha1_md = | - | ||||||||||||
| 281 | ((void *)0) | - | ||||||||||||
| 282 | ; | - | ||||||||||||
| 283 | static const EVP_MD *test_sha_md(void) | - | ||||||||||||
| 284 | { | - | ||||||||||||
| 285 | if (sha1_md ==
| 0 | ||||||||||||
| 286 | ((void *)0)
| 0 | ||||||||||||
| 287 | ) { | - | ||||||||||||
| 288 | EVP_MD *md; | - | ||||||||||||
| 289 | - | |||||||||||||
| 290 | if ((
| 0 | ||||||||||||
| 291 | ((void *)0)
| 0 | ||||||||||||
| 292 | - | |||||||||||||
| 293 | || !EVP_MD_meth_set_result_size(md, 20)
| 0 | ||||||||||||
| 294 | || !EVP_MD_meth_set_input_blocksize(md, (16*4))
| 0 | ||||||||||||
| 295 | || !EVP_MD_meth_set_app_datasize(md,
| 0 | ||||||||||||
| 296 | sizeof(EVP_MD *) + sizeof(SHA_CTX))
| 0 | ||||||||||||
| 297 | || !EVP_MD_meth_set_flags(md, 0)
| 0 | ||||||||||||
| 298 | || !EVP_MD_meth_set_init(md, test_sha1_init)
| 0 | ||||||||||||
| 299 | || !EVP_MD_meth_set_update(md, test_sha1_update)
| 0 | ||||||||||||
| 300 | || !EVP_MD_meth_set_final(md, test_sha1_final)
| 0 | ||||||||||||
| 301 | EVP_MD_meth_free(md); | - | ||||||||||||
| 302 | md = | - | ||||||||||||
| 303 | ((void *)0) | - | ||||||||||||
| 304 | ; | - | ||||||||||||
| 305 | } never executed: end of block | 0 | ||||||||||||
| 306 | sha1_md = md; | - | ||||||||||||
| 307 | } never executed: end of block | 0 | ||||||||||||
| 308 | return never executed: sha1_md;return sha1_md;never executed: return sha1_md; | 0 | ||||||||||||
| 309 | } | - | ||||||||||||
| 310 | static void test_sha_md_destroy(void) | - | ||||||||||||
| 311 | { | - | ||||||||||||
| 312 | EVP_MD_meth_free(sha1_md); | - | ||||||||||||
| 313 | sha1_md = | - | ||||||||||||
| 314 | ((void *)0) | - | ||||||||||||
| 315 | ; | - | ||||||||||||
| 316 | } never executed: end of block | 0 | ||||||||||||
| 317 | static int test_digest_nids(const int **nids) | - | ||||||||||||
| 318 | { | - | ||||||||||||
| 319 | static int digest_nids[2] = { 0, 0 }; | - | ||||||||||||
| 320 | static int pos = 0; | - | ||||||||||||
| 321 | static int init = 0; | - | ||||||||||||
| 322 | - | |||||||||||||
| 323 | if (!init
| 0 | ||||||||||||
| 324 | const EVP_MD *md; | - | ||||||||||||
| 325 | if ((
| 0 | ||||||||||||
| 326 | ((void *)0)
| 0 | ||||||||||||
| 327 | ) | - | ||||||||||||
| 328 | digest_nids[pos++] = EVP_MD_type(md); never executed: digest_nids[pos++] = EVP_MD_type(md); | 0 | ||||||||||||
| 329 | digest_nids[pos] = 0; | - | ||||||||||||
| 330 | init = 1; | - | ||||||||||||
| 331 | } never executed: end of block | 0 | ||||||||||||
| 332 | *nids = digest_nids; | - | ||||||||||||
| 333 | return never executed: pos;return pos;never executed: return pos; | 0 | ||||||||||||
| 334 | } | - | ||||||||||||
| 335 | - | |||||||||||||
| 336 | static int openssl_digests(ENGINE *e, const EVP_MD **digest, | - | ||||||||||||
| 337 | const int **nids, int nid) | - | ||||||||||||
| 338 | { | - | ||||||||||||
| 339 | if (!digest
| 0 | ||||||||||||
| 340 | - | |||||||||||||
| 341 | return never executed: test_digest_nids(nids);return test_digest_nids(nids);never executed: return test_digest_nids(nids); | 0 | ||||||||||||
| 342 | } | - | ||||||||||||
| 343 | - | |||||||||||||
| 344 | if (nid == 64
| 0 | ||||||||||||
| 345 | * never executed: digest = test_sha_md();*digest = test_sha_md();never executed: *digest = test_sha_md(); | 0 | ||||||||||||
| 346 | else { | - | ||||||||||||
| 347 | - | |||||||||||||
| 348 | - | |||||||||||||
| 349 | - | |||||||||||||
| 350 | - | |||||||||||||
| 351 | *digest = | - | ||||||||||||
| 352 | ((void *)0) | - | ||||||||||||
| 353 | ; | - | ||||||||||||
| 354 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 355 | } | - | ||||||||||||
| 356 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 357 | } | - | ||||||||||||
| 358 | - | |||||||||||||
| 359 | - | |||||||||||||
| 360 | - | |||||||||||||
| 361 | static EVP_PKEY *openssl_load_privkey(ENGINE *eng, const char *key_id, | - | ||||||||||||
| 362 | UI_METHOD *ui_method, | - | ||||||||||||
| 363 | void *callback_data) | - | ||||||||||||
| 364 | { | - | ||||||||||||
| 365 | BIO *in; | - | ||||||||||||
| 366 | EVP_PKEY *key; | - | ||||||||||||
| 367 | fprintf( | - | ||||||||||||
| 368 | stderr | - | ||||||||||||
| 369 | , "(TEST_ENG_OPENSSL_PKEY)Loading Private key %s\n", | - | ||||||||||||
| 370 | key_id); | - | ||||||||||||
| 371 | in = BIO_new_file(key_id, "r"); | - | ||||||||||||
| 372 | if (!in
| 0 | ||||||||||||
| 373 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 374 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 375 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 376 | key = PEM_read_bio_PrivateKey(in, | - | ||||||||||||
| 377 | ((void *)0) | - | ||||||||||||
| 378 | , 0, | - | ||||||||||||
| 379 | ((void *)0) | - | ||||||||||||
| 380 | ); | - | ||||||||||||
| 381 | BIO_free(in); | - | ||||||||||||
| 382 | return never executed: key;return key;never executed: return key; | 0 | ||||||||||||
| 383 | } | - | ||||||||||||
| 384 | int openssl_destroy(ENGINE *e) | - | ||||||||||||
| 385 | { | - | ||||||||||||
| 386 | test_sha_md_destroy(); | - | ||||||||||||
| 387 | - | |||||||||||||
| 388 | test_r4_cipher_destroy(); | - | ||||||||||||
| 389 | test_r4_40_cipher_destroy(); | - | ||||||||||||
| 390 | - | |||||||||||||
| 391 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 392 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |