| 1433 | */ |
| 1434 | |
| 1435 | static X509 * // O - Certificate |
| 1436 | http_create_credential( |
| 1437 | http_credential_t *credential) // I - Credential |
| 1438 | { |
| 1439 | X509 *cert = NULL; // Certificate |
| 1440 | BIO *bio; // Basic I/O for string |
| 1441 | |
| 1442 | |
| 1443 | if (!credential) |
| 1444 | return (NULL); |
| 1445 | |
| 1446 | if ((bio = BIO_new_mem_buf(credential->data, credential->datalen)) == NULL) |
| 1447 | return (NULL); |
| 1448 | |
| 1449 | PEM_read_bio_X509(bio, &cert, NULL, (void *)""); |
| 1450 | |
| 1451 | BIO_free(bio); |
| 1452 | |
| 1453 | return (cert); |
| 1454 | } |
| 1455 | |
| 1456 | |
| 1457 | /* |
no outgoing calls
no test coverage detected