| 261 | } |
| 262 | |
| 263 | static void parse_otherName_value(apr_pool_t *p, ASN1_TYPE *value, |
| 264 | const char *onf, apr_array_header_t **entries) |
| 265 | { |
| 266 | const char *str; |
| 267 | int nid = onf ? OBJ_txt2nid(onf) : NID_undef; |
| 268 | |
| 269 | if (!value || (nid == NID_undef) || !*entries) |
| 270 | return; |
| 271 | |
| 272 | /* |
| 273 | * Currently supported otherName forms (values for "onf"): |
| 274 | * "msUPN" (1.3.6.1.4.1.311.20.2.3): Microsoft User Principal Name |
| 275 | * "id-on-dnsSRV" (1.3.6.1.5.5.7.8.7): SRVName, as specified in RFC 4985 |
| 276 | */ |
| 277 | if ((nid == NID_ms_upn) && (value->type == V_ASN1_UTF8STRING) && |
| 278 | (str = asn1_string_to_utf8(p, value->value.utf8string))) { |
| 279 | APR_ARRAY_PUSH(*entries, const char *) = str; |
| 280 | } else if (strEQ(onf, "id-on-dnsSRV") && |
| 281 | (value->type == V_ASN1_IA5STRING) && |
| 282 | (str = asn1_string_to_utf8(p, value->value.ia5string))) { |
| 283 | APR_ARRAY_PUSH(*entries, const char *) = str; |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | /* |
| 288 | * Return an array of subjectAltName entries of type "type". If idx is -1, |
no outgoing calls
no test coverage detected