diff --git a/portal-impl/src/com/liferay/portal/license/util/LicenseUtil.java b/portal-impl/src/com/liferay/portal/license/util/LicenseUtil.java
index 3827e6c5f969358a860d9295553858d2242d0033..456ead34a75411f41c5880d9056228d84e84d888 100644
--- a/portal-impl/src/com/liferay/portal/license/util/LicenseUtil.java
+++ b/portal-impl/src/com/liferay/portal/license/util/LicenseUtil.java
@@ -24,6 +24,7 @@ import com.liferay.portal.kernel.json.JSONFactoryUtil;
 import com.liferay.portal.kernel.json.JSONObject;
 import com.liferay.portal.kernel.log.Log;
 import com.liferay.portal.kernel.log.LogFactoryUtil;
+import com.liferay.portal.kernel.util.ArrayUtil;
 import com.liferay.portal.kernel.util.Base64;
 import com.liferay.portal.kernel.util.CharPool;
 import com.liferay.portal.kernel.util.Constants;
@@ -69,8 +70,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 import javax.crypto.KeyGenerator;
 
@@ -83,12 +82,17 @@ import org.apache.http.HttpResponse;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.UsernamePasswordCredentials;
 import org.apache.http.client.CredentialsProvider;
+import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpPost;
-import org.apache.http.conn.ClientConnectionManager;
-import org.apache.http.conn.params.ConnRoutePNames;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.HttpClientConnectionManager;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
 import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.params.HttpParams;
+import org.apache.http.impl.client.BasicCredentialsProvider;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
 
 /**
  * @author Amos Fong
@@ -156,142 +160,11 @@ public class LicenseUtil {
 	}
 
 	public static Set<String> getIpAddresses() {
-		if (_ipAddresses != null) {
-			return new HashSet<String>(_ipAddresses);
-		}
-
-		_ipAddresses = new HashSet<String>();
-
-		try {
-			List<NetworkInterface> networkInterfaces = Collections.list(
-				NetworkInterface.getNetworkInterfaces());
-
-			for (NetworkInterface networkInterface : networkInterfaces) {
-				List<InetAddress> inetAddresses = Collections.list(
-					networkInterface.getInetAddresses());
-
-				for (InetAddress inetAddress : inetAddresses) {
-					if (inetAddress.isLinkLocalAddress() ||
-						inetAddress.isLoopbackAddress() ||
-						!(inetAddress instanceof Inet4Address)) {
-
-						continue;
-					}
-
-					_ipAddresses.add(inetAddress.getHostAddress());
-				}
-			}
-		}
-		catch (Exception e) {
-			_log.error("Unable to read local server's IP addresses");
-
-			_log.error(e, e);
-		}
-
-		return new HashSet<String>(_ipAddresses);
+		return _ipAddresses;
 	}
 
 	public static Set<String> getMacAddresses() {
-		if (_macAddresses != null) {
-			return new HashSet<String>(_macAddresses);
-		}
-
-		Set<String> macAddresses = new HashSet<String>();
-
-		String osName = System.getProperty("os.name");
-
-		String executable = null;
-		String arguments = null;
-
-		if (StringUtil.startsWith(osName, "win")) {
-			executable = "ipconfig";
-			arguments = "/all";
-		}
-		else {
-			if (StringUtil.startsWith(osName, "aix")) {
-				executable = "netstat";
-				arguments = "-ina";
-			}
-			else {
-				executable = "ifconfig";
-				arguments = "-a";
-			}
-
-			File sbinDir = new File("/sbin", executable);
-
-			if (sbinDir.exists()) {
-				executable = "/sbin/".concat(executable);
-			}
-		}
-
-		try {
-			Runtime runtime = Runtime.getRuntime();
-
-			Process process = runtime.exec(
-				new String[] {executable, arguments});
-
-			macAddresses = getMacAddresses(osName, process.getInputStream());
-		}
-		catch (Exception e) {
-			_log.error(e, e);
-		}
-
-		_macAddresses = macAddresses;
-
-		return new HashSet<String>(macAddresses);
-	}
-
-	public static Set<String> getMacAddresses(
-			String osName, InputStream processInputStream)
-		throws Exception {
-
-		Set<String> macAddresses = new HashSet<String>();
-
-		Pattern macAddressPattern = _macAddressPattern1;
-
-		if (StringUtil.startsWith(osName, "aix")) {
-			macAddressPattern = _macAddressPattern2;
-		}
-
-		String processOutput = StringUtil.read(processInputStream);
-
-		String[] lines = StringUtil.split(processOutput, CharPool.NEW_LINE);
-
-		for (String line : lines) {
-			Matcher matcher = macAddressPattern.matcher(line);
-
-			if (!matcher.find()) {
-				continue;
-			}
-
-			String macAddress = matcher.group(1);
-
-			macAddress = StringUtil.toLowerCase(macAddress);
-			macAddress = macAddress.replace(CharPool.DASH, CharPool.COLON);
-			macAddress = macAddress.replace(CharPool.PERIOD, CharPool.COLON);
-
-			StringBuilder sb = new StringBuilder(17);
-
-			sb.append(macAddress);
-
-			for (int i = 1; i < 5; ++i) {
-				int pos = (i * 3) - 1;
-
-				if (sb.charAt(pos) != CharPool.COLON) {
-					sb.insert((i - 1) * 3, CharPool.NUMBER_0);
-				}
-			}
-
-			if (sb.length() < 17) {
-				sb.insert(15, CharPool.NUMBER_0);
-			}
-
-			macAddress = sb.toString();
-
-			macAddresses.add(macAddress);
-		}
-
-		return macAddresses;
+		return _macAddresses;
 	}
 
 	public static byte[] getServerIdBytes() throws Exception {
@@ -427,9 +300,23 @@ public class LicenseUtil {
 	}
 
 	public static String sendRequest(String request) throws Exception {
-		DefaultHttpClient defaultHttpClient = new DefaultHttpClient();
+		HttpClient httpClient = null;
+
+		HttpClientConnectionManager httpClientConnectionManager =
+			new BasicHttpClientConnectionManager(
+				RegistryBuilder.<ConnectionSocketFactory>create(
+				).register(
+					Http.HTTP, PlainConnectionSocketFactory.getSocketFactory()
+				).register(
+					Http.HTTPS,
+					SSLConnectionSocketFactory.getSystemSocketFactory()
+				).build());
 
 		try {
+			HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
+
+			httpClientBuilder.setConnectionManager(httpClientConnectionManager);
+
 			String serverURL = LICENSE_SERVER_URL;
 
 			if (!serverURL.endsWith(StringPool.SLASH)) {
@@ -442,6 +329,11 @@ public class LicenseUtil {
 
 			HttpPost httpPost = new HttpPost(uri);
 
+			CredentialsProvider credentialsProvider =
+				new BasicCredentialsProvider();
+
+			HttpHost proxyHttpHost = null;
+
 			if (Validator.isNotNull(_PROXY_URL)) {
 				if (_log.isInfoEnabled()) {
 					_log.info(
@@ -449,17 +341,9 @@ public class LicenseUtil {
 							_PROXY_PORT);
 				}
 
-				HttpHost httpHost = new HttpHost(_PROXY_URL, _PROXY_PORT);
-
-				HttpParams httpParams = defaultHttpClient.getParams();
-
-				httpParams.setParameter(
-					ConnRoutePNames.DEFAULT_PROXY, httpHost);
+				proxyHttpHost = new HttpHost(_PROXY_URL, _PROXY_PORT);
 
 				if (Validator.isNotNull(_PROXY_USER_NAME)) {
-					CredentialsProvider credentialsProvider =
-						defaultHttpClient.getCredentialsProvider();
-
 					credentialsProvider.setCredentials(
 						new AuthScope(_PROXY_URL, _PROXY_PORT),
 						new UsernamePasswordCredentials(
@@ -467,6 +351,12 @@ public class LicenseUtil {
 				}
 			}
 
+			httpClientBuilder.setDefaultCredentialsProvider(
+				credentialsProvider);
+			httpClientBuilder.setProxy(proxyHttpHost);
+
+			httpClient = httpClientBuilder.build();
+
 			ByteArrayEntity byteArrayEntity = new ByteArrayEntity(
 				_encryptRequest(serverURL, request));
 
@@ -474,7 +364,7 @@ public class LicenseUtil {
 
 			httpPost.setEntity(byteArrayEntity);
 
-			HttpResponse httpResponse = defaultHttpClient.execute(httpPost);
+			HttpResponse httpResponse = httpClient.execute(httpPost);
 
 			HttpEntity httpEntity = httpResponse.getEntity();
 
@@ -492,10 +382,9 @@ public class LicenseUtil {
 			return response;
 		}
 		finally {
-			ClientConnectionManager clientConnectionManager =
-				defaultHttpClient.getConnectionManager();
-
-			clientConnectionManager.shutdown();
+			if (httpClient != null) {
+				httpClientConnectionManager.shutdown();
+			}
 		}
 	}
 
@@ -592,6 +481,74 @@ public class LicenseUtil {
 		return jsonObject.toString().getBytes(StringPool.UTF8);
 	}
 
+	private static Set<String> _getIPAddresses() {
+		Set<String> ipAddresses = new HashSet<String>();
+
+		try {
+			List<NetworkInterface> networkInterfaces = Collections.list(
+				NetworkInterface.getNetworkInterfaces());
+
+			for (NetworkInterface networkInterface : networkInterfaces) {
+				List<InetAddress> inetAddresses = Collections.list(
+					networkInterface.getInetAddresses());
+
+				for (InetAddress inetAddress : inetAddresses) {
+					if (inetAddress.isLinkLocalAddress() ||
+						inetAddress.isLoopbackAddress() ||
+						!(inetAddress instanceof Inet4Address)) {
+
+						continue;
+					}
+
+					ipAddresses.add(inetAddress.getHostAddress());
+				}
+			}
+		}
+		catch (Exception e) {
+			_log.error("Unable to read local server's IP addresses", e);
+		}
+
+		return ipAddresses;
+	}
+
+	private static Set<String> _getMACAddresses() {
+		Set<String> macAddresses = new HashSet<String>();
+
+		try {
+			List<NetworkInterface> networkInterfaces = Collections.list(
+				NetworkInterface.getNetworkInterfaces());
+
+			for (NetworkInterface networkInterface : networkInterfaces) {
+				byte[] hardwareAddress = networkInterface.getHardwareAddress();
+
+				if (ArrayUtil.isEmpty(hardwareAddress)) {
+					continue;
+				}
+
+				StringBuilder sb = new StringBuilder(
+					(hardwareAddress.length * 3) - 1);
+
+				String hexString = StringUtil.bytesToHexString(hardwareAddress);
+
+				for (int i = 0; i < hexString.length(); i += 2) {
+					if (i != 0) {
+						sb.append(CharPool.COLON);
+					}
+
+					sb.append(Character.toLowerCase(hexString.charAt(i)));
+					sb.append(Character.toLowerCase(hexString.charAt(i + 1)));
+				}
+
+				macAddresses.add(sb.toString());
+			}
+		}
+		catch (Exception e) {
+			_log.error("Unable to read local server's MAC addresses", e);
+		}
+
+		return macAddresses;
+	}
+
 	private static Map<String, String> _getOrderProducts(
 		JSONObject jsonObject) {
 
@@ -700,12 +657,8 @@ public class LicenseUtil {
 	private static String _encryptedSymmetricKey;
 	private static MethodHandler _getServerInfoMethodHandler =
 		new MethodHandler(new MethodKey(LicenseUtil.class, "getServerInfo"));
-	private static Set<String> _ipAddresses;
-	private static Set<String> _macAddresses;
-	private static Pattern _macAddressPattern1 = Pattern.compile(
-		"\\s((\\p{XDigit}{1,2}(-|:)){5}(\\p{XDigit}{1,2}))(?:\\s|$)");
-	private static Pattern _macAddressPattern2 = Pattern.compile(
-		"\\s((\\p{XDigit}{1,2}(\\.)){5}(\\p{XDigit}{1,2}))(?:\\s|$)");
+	private static final Set<String> _ipAddresses;
+	private static final Set<String> _macAddresses;
 	private static MethodKey _registerOrderMethodKey = new MethodKey(
 		LicenseUtil.class, "registerOrder", String.class, String.class,
 		int.class);
@@ -714,6 +667,9 @@ public class LicenseUtil {
 
 	static {
 		_initKeys();
+
+		_ipAddresses = _getIPAddresses();
+		_macAddresses = _getMACAddresses();
 	}
 
 }
\ No newline at end of file
