summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add support for PKCS#8 encoded private keysHEADmasterRich Megginson2010-08-092-43/+110
| | | | | | | The code supports PKCS#1 encoded RSA private keys that begin with the BEGIN RSA PRIVATE KEY header in PEM files. This patch adds support for RSA private keys encoded in PEM files that begin with the header BEGIN PRIVATE KEY which are in PKCS#8 format.
* Do not define SEC_SkipTemplateRich Megginson2010-08-091-0/+3
| | | | | Building NSS with PEM support gives an error in pbobject due to multiple definitions of SEC_SkipTemplate. This is already defined in libnssutil
* fix memory leak in pem_mdCryptoOperationRSAPriv_DestroyRich Megginson2010-04-121-0/+3
| | | | | | pem_mdCryptoOperationRSAPriv_Destroy should destroy the low private key pem_mdCryptoOperationRSAPriv_Create allocates the lpk member of iOperation but it was not being freed anywhere
* Make CopyObject return a new, shallow copyRich Megginson2010-04-121-1/+12
| | | | | | Due to the semantics or possibly a bug in NSSCKFWC_CopyObject(), the pem CopyObject function must return a new mdObject *. So this patch creates a new mdObject as a shallow copy of the old one.
* Allow collect_objects() to search through all objectclassesRich Megginson2010-04-122-6/+13
| | | | | | | | | | Added a pemAll to pemObjectType enum - changed collect_objects() to look through all types of objects if the caller did not specify a particular type of object to look for - some of the PK11 routines do not specify the type e.g. PK11_FindObjectForCert(): CK_ATTRIBUTE searchTemplate = { CKA_VALUE, NULL, 0 }; PK11_SETATTRS(&searchTemplate, CKA_VALUE, cert->derCert.data, cert->derCert.len);
* nssckbi.h: remove redundant copy of a headerKamil Dudka2009-12-102-91/+1
| | | | | | spotted by Elio Maldonado Batiz Signed-off-by: Kamil Dudka <kdudka@redhat.com>
* do not crash when using malformed key fileKamil Dudka2009-08-281-0/+4
| | | | Resolves 512019
* implement memory management for internal objectsKamil Dudka2009-08-205-242/+266
| | | | | | | | | | | | | | * ckpem.h: Define list objects, add reference counter to internal objects. * pfind.c: Increase object's reference while exporting. Skip already freed objects. * pinst.c (AddObjectIfNeeded): New function providing sharing of internal objects. * pobject.c: Add support for list objects. Implement pem_mdObject_Finalize(). * psession.c (pem_mdSession_CopyObject): Increase reference count only. Signed-off-by: Kamil Dudka <kdudka@redhat.com>
* Fix leaks in make_key and md_SessionLogin plus error codesElio Maldonado Batiz2009-06-291-4/+15
| | | | Resolves 501191
* Fix various memory leaks and free internal objects on module unload.Kamil Dudka2009-05-295-16/+56
| | | | | | Elio helped me to complete the patch. 501080
* Do not clone internal objects in collect_objects().Kamil Dudka2009-05-291-197/+28
| | | | 501118
* Do not bypass initialization if module arguments are omitted.Kamil Dudka2009-05-291-6/+3
| | | | 501058
* Fix gcc warnings.Kamil Dudka2009-05-296-17/+14
| | | | 500815
* Support arbitrarily long password while loading a private key.Kamil Dudka2009-05-291-1/+1
| | | | | | Reported by Michael Cronenworth. 500180
* Fix off-by-one error when computing size to reduce memory leak.Rob Crittenden2009-05-221-4/+1
| | | | | | Patch contributed by Kamil Dudka. 483855
* Fix data type to work on x86_64 systems. We were only copying the bottom 4Rob Crittenden2009-05-221-1/+1
| | | | | | bytes of the U_LONG (Intel is a little endian platform). 429175
* Initial import of code. This is equivalent to the 20080124 tarball inRob Crittenden2009-05-2216-0/+5913
the Fedora nss package tree.