| 186 | } |
| 187 | |
| 188 | char *modssl_bio_free_read(apr_pool_t *p, BIO *bio) |
| 189 | { |
| 190 | int len = BIO_pending(bio); |
| 191 | char *result = NULL; |
| 192 | |
| 193 | if (len > 0) { |
| 194 | result = apr_palloc(p, len+1); |
| 195 | len = BIO_read(bio, result, len); |
| 196 | result[len] = NUL; |
| 197 | } |
| 198 | BIO_free(bio); |
| 199 | return result; |
| 200 | } |
| 201 | |
| 202 | /* Convert ASN.1 string to a pool-allocated char * string, escaping |
| 203 | * control characters. If raw is zero, convert to UTF-8, otherwise |
no outgoing calls
no test coverage detected