MCPcopy Create free account
hub / github.com/apache/httpd / modssl_bio_free_read

Function modssl_bio_free_read

modules/ssl/ssl_util_ssl.c:188–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188char *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

Calls

no outgoing calls

Tested by

no test coverage detected