protected String parseOtherNameDnsSrv( ASN1Primitive srvName )
    {
        // RFC 4985 says that this should be a IA5 String.
        final ASN1TaggedObject taggedObject = (ASN1TaggedObject) srvName;
        final ASN1IA5String instance = ASN1IA5String.getInstance(taggedObject, true);
        final String value = instance.getString();

        if ( value.toLowerCase().startsWith( "_xmpp-server." ) )
        {
            return value.substring( "_xmpp-server.".length() );
        }
        else if ( value.toLowerCase().startsWith( "_xmpp-client." ) )
        {
            return value.substring( "_xmpp-client.".length() );
        }
        else
        {
            // Not applicable to XMPP. Ignore.
            Log.debug( "srvName value '{}' of id-on-dnsSRV record is neither _xmpp-server nor _xmpp-client. It is being ignored.", value );
            return null;
        }
    }
Parses a SRVName value as specified by RFC 4985.

This method parses the argument value as a DNS SRV Resource Record. Only when the parsed value refers to an XMPP
related service, the corresponding DNS domain name is returned (minus the service name).

@param srvName The ASN.1 representation of the srvName value (cannot be null).
@return an XMPP address value, or null when the record does not relate to XMPP.
xmppserver/src/main/java/org/jivesoftware/util/cert/SANCertificateIdentityMapping.java