components/openssl/openssl-1.0.1/engines/pkcs11/e_pk11_uri.c
changeset 4720 1ccedfc24ebb
parent 1489 bad87e4131b9
--- a/components/openssl/openssl-1.0.1/engines/pkcs11/e_pk11_uri.c	Thu Jun 04 22:34:13 2015 -0700
+++ b/components/openssl/openssl-1.0.1/engines/pkcs11/e_pk11_uri.c	Wed Jul 29 14:06:05 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -247,6 +247,7 @@
 		 * attributes.
 		 */
 		if (strcmp(name, PK11_TOKEN) == 0)
+			{
 			if (uri_struct->token == NULL)
 				{
 				if ((uri_struct->token = strdup(l2)) == NULL)
@@ -254,7 +255,9 @@
 				}
 			else
 				goto bad_uri;
+			}
 		else if (strcmp(name, PK11_MANUF) == 0)
+			{
 			if (uri_struct->manuf == NULL)
 				{
 				if ((uri_struct->manuf = strdup(l2)) == NULL)
@@ -262,7 +265,9 @@
 				}
 			else
 				goto bad_uri;
+			}
 		else if (strcmp(name, PK11_SERIAL) == 0)
+			{
 			if (uri_struct->serial == NULL)
 				{
 				if ((uri_struct->serial = strdup(l2)) == NULL)
@@ -270,7 +275,9 @@
 				}
 			else
 				goto bad_uri;
+			}
 		else if (strcmp(name, PK11_MODEL) == 0)
+			{
 			if (uri_struct->model == NULL)
 				{
 				if ((uri_struct->model = strdup(l2)) == NULL)
@@ -278,7 +285,9 @@
 				}
 			else
 				goto bad_uri;
+			}
 		else if (strcmp(name, PK11_OBJECT) == 0)
+			{
 			if (uri_struct->object == NULL)
 				{
 				if ((uri_struct->object = strdup(l2)) == NULL)
@@ -286,7 +295,9 @@
 				}
 			else
 				goto bad_uri;
+			}
 		else if (strcmp(name, PK11_OBJECTTYPE) == 0)
+			{
 			if (uri_struct->objecttype == NULL)
 				{
 				uri_struct->objecttype = strdup(l2);
@@ -295,7 +306,9 @@
 				}
 			else
 				goto bad_uri;
+			}
 		else if (strcmp(name, PK11_ASKPASS) == 0)
+			{
 			if (uri_struct->askpass == NULL)
 				{
 				if ((uri_struct->askpass = strdup(l2)) == NULL)
@@ -303,6 +316,7 @@
 				}
 			else
 				goto bad_uri;
+			}
 		else
 			goto bad_uri;
 		}
@@ -493,17 +507,21 @@
 		goto ok;
 
 	if (pk11_get_pin_caching_policy() == POLICY_MEMORY)
+		{
 		if ((token_pin = strdup(pin)) == NULL)
 			{
 			PK11err(PK11_F_CACHE_PIN, PK11_R_MALLOC_FAILURE);
 			goto err;
 			}
+		}
 	else
+		{
 		if (pk11_get_pin_caching_policy() == POLICY_MLOCKED_MEMORY)
 			{
 			if (mlock_pin_in_memory(pin) == 0)
 				goto err;
 			}
+		}
 
 ok:
 	(void) pthread_mutex_unlock(uri_lock);