secureswitools/swisistools/source/signsislib/sissignature.cpp
branchRCL_3
changeset 62 5cc91383ab1e
parent 0 ba25891c3a9e
child 81 42552535c1ac
equal deleted inserted replaced
61:cd189dac02f7 62:5cc91383ab1e
     1 /*
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   425 				if (! unknown)
   425 				if (! unknown)
   426 					{
   426 					{
   427 					std::cout << ERR_error_string (ERR_get_error (), NULL);
   427 					std::cout << ERR_error_string (ERR_get_error (), NULL);
   428 					}
   428 					}
   429 				BIO_free(mem);
   429 				BIO_free(mem);
       
   430 				mem = NULL;
   430 				RSA_free (rsa);
   431 				RSA_free (rsa);
   431 				}
   432 				}
   432 			else
   433 			else
   433 				{
   434 				{
   434 				if (unknown)
   435 				if (unknown)
   449 			DSA* dsa = DSA_generate_parameters (DSA_PRIME_SIZE, NULL, 0, NULL, NULL, NULL, NULL);
   450 			DSA* dsa = DSA_generate_parameters (DSA_PRIME_SIZE, NULL, 0, NULL, NULL, NULL, NULL);
   450 			if (! PEM_read_bio_DSAPrivateKey (mem, &dsa, NULL, pass))
   451 			if (! PEM_read_bio_DSAPrivateKey (mem, &dsa, NULL, pass))
   451 				{
   452 				{
   452 				std::cout << ERR_error_string (ERR_get_error (), NULL);
   453 				std::cout << ERR_error_string (ERR_get_error (), NULL);
   453 				BIO_free(mem);
   454 				BIO_free(mem);
       
   455 				mem = NULL;
   454 				DSA_free (dsa);
   456 				DSA_free (dsa);
   455 				}
   457 				}
   456 			else
   458 			else
   457 				{
   459 				{
   458 				if (unknown)
   460 				if (unknown)