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

Function dump_extn_value

modules/ssl/ssl_engine_vars.c:1038–1057  ·  view source on GitHub ↗

For an extension type which OpenSSL does not recognize, attempt to * parse the extension type as a primitive string. This will fail for * any structured extension type per the docs. Returns non-zero on * success and writes the string to the given bio. */

Source from the content-addressed store, hash-verified

1036 * any structured extension type per the docs. Returns non-zero on
1037 * success and writes the string to the given bio. */
1038static int dump_extn_value(BIO *bio, const ASN1_OCTET_STRING *str)
1039{
1040 const unsigned char *pp = ASN1_STRING_get0_data(str);
1041 ASN1_STRING *ret = ASN1_STRING_new();
1042 int rv = 0;
1043
1044 if (!ret) {
1045 return rv;
1046 }
1047
1048 /* This allows UTF8String, IA5String, VisibleString, or BMPString;
1049 * conversion to UTF-8 is forced. */
1050 if (d2i_DISPLAYTEXT(&ret, &pp, ASN1_STRING_length(str))) {
1051 ASN1_STRING_print_ex(bio, ret, ASN1_STRFLGS_UTF8_CONVERT);
1052 rv = 1;
1053 }
1054
1055 ASN1_STRING_free(ret);
1056 return rv;
1057}
1058
1059apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer,
1060 const char *extension)

Callers 1

ssl_ext_listFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected