components/openssl/openssl-1.0.0/engines/pkcs11/hw_pk11.c
changeset 1087 dffd76daaa5c
parent 970 96684f3b89ff
equal deleted inserted replaced
1086:658961e6c9b9 1087:dffd76daaa5c
  1216 	{
  1216 	{
  1217 	ENGINE* old_engine = pk11_engine;
  1217 	ENGINE* old_engine = pk11_engine;
  1218 
  1218 
  1219 	if (old_engine) {
  1219 	if (old_engine) {
  1220 		pk11_engine = NULL;
  1220 		pk11_engine = NULL;
  1221 		ENGINE_free(old_engine);
       
  1222 	}
  1221 	}
  1223 	}
  1222 	}
  1224 
  1223 
  1225 /*
  1224 /*
  1226  * Initialization function. Sets up various PKCS#11 library components.
  1225  * Initialization function. Sets up various PKCS#11 library components.
  1241 
  1240 
  1242 	if (e != pk11_engine)
  1241 	if (e != pk11_engine)
  1243 		{
  1242 		{
  1244 		pk11_engine_free();
  1243 		pk11_engine_free();
  1245 		pk11_engine = e;
  1244 		pk11_engine = e;
  1246 		ENGINE_up_ref(e);
       
  1247 		}
  1245 		}
  1248 
  1246 
  1249 	/*
  1247 	/*
  1250 	 * pk11_library_initialized is set to 0 in pk11_finish() which is called
  1248 	 * pk11_library_initialized is set to 0 in pk11_finish() which is called
  1251 	 * from ENGINE_finish(). However, if there is still at least one
  1249 	 * from ENGINE_finish(). However, if there is still at least one