class X509CertUtils {

    public static String extractRequestInstanceIdFromURI(final List<String> uriList) {

        for (String uri : uriList) {
            if (!uri.startsWith(ZTSConsts.ZTS_CERT_INSTANCE_ID_URI)) {
                continue;
            }
            // skip the provider value
            int idx = uri.substring(ZTSConsts.ZTS_CERT_INSTANCE_ID_URI.length()).indexOf('/');
            if (idx != -1) {
                return uri.substring(ZTSConsts.ZTS_CERT_INSTANCE_ID_URI.length() + idx + 1);
            }
        }

        return null;
    }

}