protected String[] getEnabledProtocols(SSLEngine engine, String requestedProtocols) {
		String[] supportedProtocols = engine.getSupportedProtocols();

		String[] enabledProtocols = null;

		if (requestedProtocols != null) {
			Vector<Object> vec = null;
			String tab[] = requestedProtocols.trim().split("\\s*,\\s*");
			if (tab.length > 0) {
				vec = new Vector<Object>(tab.length);
			}
			for (String s : tab) {
				if (s.length() > 0) {
					/*
					 * Check to see if the requested protocol is among the
					 * supported protocols, i.e., may be already enabled
					 */
					for (int i = 0; supportedProtocols != null && i < supportedProtocols.length; i++) {
						if (supportedProtocols[i].equals(s)) {
							vec.addElement(s);
							break;
						}
					}
				}
			}

			if (vec != null && !vec.isEmpty()) {
				enabledProtocols = new String[vec.size()];
				vec.copyInto(enabledProtocols);
			}
		}

		return enabledProtocols;
	}