OLD | NEW |
1 /* Written by Corinne Dive-Reclus(cdive@baltimore.com) | 1 /* Written by Corinne Dive-Reclus(cdive@baltimore.com) |
2 * | 2 * |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * | 10 * |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 EVP_PKEY_assign_DSA(res, dsatmp); | 751 EVP_PKEY_assign_DSA(res, dsatmp); |
752 break; | 752 break; |
753 #endif | 753 #endif |
754 | 754 |
755 default: | 755 default: |
756 SUREWAREerr(SUREWARE_F_SUREWARE_LOAD_PUBLIC,ENGINE_R_FAILED_LOAD
ING_PRIVATE_KEY); | 756 SUREWAREerr(SUREWARE_F_SUREWARE_LOAD_PUBLIC,ENGINE_R_FAILED_LOAD
ING_PRIVATE_KEY); |
757 goto err; | 757 goto err; |
758 } | 758 } |
759 return res; | 759 return res; |
760 err: | 760 err: |
761 if (res) | |
762 EVP_PKEY_free(res); | |
763 #ifndef OPENSSL_NO_RSA | 761 #ifndef OPENSSL_NO_RSA |
764 if (rsatmp) | 762 if (rsatmp) |
765 RSA_free(rsatmp); | 763 RSA_free(rsatmp); |
766 #endif | 764 #endif |
767 #ifndef OPENSSL_NO_DSA | 765 #ifndef OPENSSL_NO_DSA |
768 if (dsatmp) | 766 if (dsatmp) |
769 DSA_free(dsatmp); | 767 DSA_free(dsatmp); |
770 #endif | 768 #endif |
771 return NULL; | 769 return NULL; |
772 } | 770 } |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 /* normalise result */ | 1046 /* normalise result */ |
1049 r->top=m->top; | 1047 r->top=m->top; |
1050 bn_fix_top(r); | 1048 bn_fix_top(r); |
1051 } | 1049 } |
1052 } | 1050 } |
1053 } | 1051 } |
1054 return ret; | 1052 return ret; |
1055 } | 1053 } |
1056 #endif /* !OPENSSL_NO_HW_SureWare */ | 1054 #endif /* !OPENSSL_NO_HW_SureWare */ |
1057 #endif /* !OPENSSL_NO_HW */ | 1055 #endif /* !OPENSSL_NO_HW */ |
OLD | NEW |