diff --git a/modules/registrars/cozaepp/cozaepp.php b/modules/registrars/cozaepp/cozaepp.php
index 534e17d0999f3942aa4c6065201481997cd9f10f..c03cc5d4bfe0290301d136655c33c8549c5271bb 100644
--- a/modules/registrars/cozaepp/cozaepp.php
+++ b/modules/registrars/cozaepp/cozaepp.php
@@ -1139,6 +1139,8 @@ function _cozaepp_Client() {
 		throw new Exception('System configuration error(2), please contact your provider');
 	}
 
+	# Create SSL context
+	$context = stream_context_create();
 	# Are we using ssl?
 	$use_ssl = false;
 	if (!empty($params['SSL']) && $params['SSL'] == 'on') {
@@ -1149,9 +1151,7 @@ function _cozaepp_Client() {
 		if (!file_exists($params['Certificate'])) {
 			throw new Exception("System configuration error(3), please contact your provider");
 		}
-
-		# Create SSL context
-		$context = stream_context_create();
+		# Set client side certificate
 		stream_context_set_option($context, 'ssl', 'local_cert', $params['Certificate']);
 	}