x
[heimdal.git] / lib / hx509 / ChangeLog
blobae4917e5e82163db9a9436f2326368f44bba887f
1 2008-01-17  Love Hörnquist Åstrand  <lha@it.su.se>
3         * version-script.map: only export C_GetFunctionList
5         * test_soft_pkcs11.c: use C_GetFunctionList
7         * softp11.c: fix comment, remove label.
9         * softp11.c: Add option app-fatal to control if softtoken should
10         abort() on erroneous input from applications.
12 2008-01-16  Love Hörnquist Åstrand  <lha@it.su.se>
14         * test_pkcs11.in: Test password less certificates too
16         * keyset.c: document HX509_CERTS_UNPROTECT_ALL
18         * ks_file.c: Support HX509_CERTS_UNPROTECT_ALL.
20         * hx509.h: Add HX509_CERTS_UNPROTECT_ALL.
22         * test_soft_pkcs11.c: Only log in if needed.
24 2008-01-15  Love Hörnquist Åstrand  <lha@it.su.se>
26         * softp11.c: Support PINs to login to the store.
28         * Makefile.am: add java pkcs11 test
30         * test_java_pkcs11.in: first version of disable java test
32         * softp11.c: Drop unused stuff.
34         * cert.c: Spelling, Add hx509_cert_get_SPKI_AlgorithmIdentifier,
35         remove unused stuff, add hx509_context to some functions.
36         
37         * softp11.c: Add more glue to figure out what keytype this
38         certificate is using.
40 2008-01-14  Love Hörnquist Åstrand  <lha@it.su.se>
42         * test_pkcs11.in: test debug
44         * Add a PKCS11 provider supporting signing and verifing sigatures.
46 2008-01-13  Love Hörnquist Åstrand  <lha@it.su.se>
48         * version-script.map: Replace hx509_name_to_der_name with
49         hx509_name_binary.
51         * print.c: make print_func static
53 2007-12-26  Love Hörnquist Åstrand  <lha@it.su.se>
55         * print.c: doxygen
57         * env.c: doxygen
59         * doxygen.c: add more groups
61         * ca.c: doxygen.
63 2007-12-17  Love Hörnquist Åstrand  <lha@it.su.se>
65         * ca.c: doxygen
67 2007-12-16  Love Hörnquist Åstrand  <lha@it.su.se>
69         * error.c: doxygen
70         
71 2007-12-15  Love Hörnquist Åstrand  <lha@it.su.se>
73         * More documentation
74         
75         * lock.c: Add page referance
77         * keyset.c: some more documentation.
79         * cms.c: Doxygen documentation.
81 2007-12-11  Love Hörnquist Åstrand  <lha@it.su.se>
83         * *.[ch]: More documentation
85 2007-12-09  Love Hörnquist Åstrand  <lha@it.su.se>
87         * handle refcount on NULL.
89         * test_nist_pkcs12.in: drop echo -n, doesn't work with posix sh
91 2007-12-08  Love Hörnquist Åstrand  <lha@it.su.se>
93         * test_nist2.in: Print that this is version 2 of the tests
95         * test_nist.in: Drop printing of $id.
97         * hx509.h: Add HX509_VHN_F_ALLOW_NO_MATCH.
99         * name.c: spelling.
101         * cert.c: make work the doxygen.
103         * name.c: fix doxygen compiling.
105         * Makefile.am: add doxygen.c
107         * doxygen.c: Add doxygen main page.
109         * cert.c: Add doxygen.
111         * revoke.c (_hx509_revoke_ref): new function.
113 2007-11-16  Love Hörnquist Åstrand  <lha@it.su.se>
115         * ks_keychain.c: Check if SecKeyGetCSPHandle needs prototype.
117 2007-08-16  Love Hörnquist Åstrand  <lha@it.su.se>
118         
119         * data/nist-data: Make work on case senstive filesystems too.
120         
121 2007-08-09  Love Hörnquist Åstrand  <lha@it.su.se>
123         * cert.c: match rfc822 contrains better, provide better error
124         strings.
126 2007-08-08  Love Hörnquist Åstrand  <lha@it.su.se>
128         * cert.c: "self-signed doesn't count" doesn't apply to trust
129         anchor certificate.  make trust anchor check consistant.
131         * revoke.c: make compile.
133         * revoke.c (verify_crl): set error strings.
134         
135         * revoke.c (verify_crl): handle with the signer is the
136         CRLsigner (shortcut).
138         * cert.c: Fix NC, comment on how to use _hx509_check_key_usage.
140 2007-08-03  Love Hörnquist Åstrand  <lha@it.su.se>
142         * test_nist2.in, Makefile, test/nist*: Add nist pkits tests. 
144         * revoke.c: Update to use CERT_REVOKED error, shortcut out of OCSP
145         checking when OCSP reply is a revocation reply.
147         * hx509_err.et: Make CERT_REVOKED error OCSP/CRL agnostic.
149         * name.c (_hx509_Name_to_string): make printableString handle
150         space (0x20) diffrences as required by rfc3280.
152         * revoke.c: Search for the right issuer when looking for the
153         issuer of the CRL signer.
155 2007-08-02  Love Hörnquist Åstrand  <lha@it.su.se>
157         * revoke.c: Handle CRL signing certificate better, try to not
158         revalidate invalid CRLs over and over.
160 2007-08-01  Love Hörnquist Åstrand  <lha@it.su.se>
162         * cms.c: remove stale comment.
164         * test_nist.in: Unpack PKITS_data.zip and run tests.
165         
166         * test_nist_cert.in: Adapt to new nist pkits framework.
168         * test_nist_pkcs12.in: Adapt to new nist pkits framework.
170         * Makefile.am: clean PKITS_data
172 2007-07-16  Love Hörnquist Åstrand  <lha@it.su.se>
174         * Makefile.am: Add version-script.map to EXTRA_DIST
176 2007-07-12  Love Hörnquist Åstrand  <lha@it.su.se>
178         * Makefile.am: Add depenency on asn1_compile for asn1 built files.
179         
180 2007-07-10  Love Hörnquist Åstrand  <lha@it.su.se>
182         * peer.c: update (c), indent.
184         * Makefile.am: New library version.
186 2007-06-28  Love Hörnquist Åstrand  <lha@it.su.se>
188         * ks_p11.c: Add sha2 types.
190         * ref/pkcs11.h: Sync with scute.
192         * ref/pkcs11.h: Add sha2 CKM's.
194         * print.c: Print authorityInfoAccess.
196         * cert.c: Rename proxyCertInfo oid.
198         * ca.c: Rename proxyCertInfo oid.
200         * print.c: Rename proxyCertInfo oid.
201         
202 2007-06-26  Love Hörnquist Åstrand  <lha@it.su.se>
204         * test_ca.in: Adapt to new request handling.
206         * req.c: Allow export some of the request parameters.
208         * hxtool-commands.in: Adapt to new request handling.
210         * hxtool.c: Adapt to new request handling.
212         * test_req.in: Adapt to new request handling.
214         * version-script.map: Add initialize_hx_error_table_r.
216         * req.c: Move _hx509_request_print here.
218         * hxtool.c: use _hx509_request_print
220         * version-script.map: Export more crap^W semiprivate functions.
222         * hxtool.c: don't _hx509_abort
224         * version-script.map: add missing ;
226 2007-06-25  Love Hörnquist Åstrand  <lha@it.su.se>
228         * cms.c: Use hx509_crypto_random_iv.
230         * crypto.c: Split out the iv creation from hx509_crypto_encrypt
231         since _hx509_pbe_encrypt needs to use the iv from the s2k
232         function.
234         * test_cert.in: Test PEM and DER FILE writing functionallity.
236         * ks_file.c: Add writing DER certificates.
238         * hxtool.c: Update to new hx509_pem_write().
240         * test_cms.in: test creation of PEM signeddata.
242         * hx509.h: PEM struct/function declarations.
244         * ks_file.c: Use PEM encoding/decoding functions.
246         * file.c: PEM encode/decoding functions.
248         * ks_file.c: Use hx509_pem_write.
250         * version-script.map: Export some semi-private functions.
252         * hxtool.c: Enable writing out signed data as a pem attachment.
254         * hxtool-commands.in (cms-create-signed): add --pem
256         * file.c (hx509_pem_write): Add.
258         * test_ca.in: Issue and test null subject cert.
260         * cert.c: Match is first component is in a CN=.
262         * test_ca.in: Test hostname if first CN.
264         * Makefile.am: Add version script.
266         * version-script.map: Limited exported symbols.
268         * test_ca.in: test --hostname.
270         * test_chain.in: test max-depth
272         * hx509.h: fixate HX509_HN_HOSTNAME at 0.
274         * hxtool-commands.in: add --hostname add --max-depth
276         * cert.c: Verify hostname and max-depth.
278         * hxtool.c: Verify hostname and test max-depth.
280 2007-06-24  Love Hörnquist Åstrand  <lha@it.su.se>
282         * test_cms.in: Test --id-by-name.
284         * hxtool-commands.in: add cms-create-sd --id-by-name
286         * hxtool.c: Use HX509_CMS_SIGATURE_ID_NAME.
288         * cms.c: Implement and use HX509_CMS_SIGATURE_ID_NAME.
290         * hx509.h: Add HX509_CMS_SIGATURE_ID_NAME, use subject name for
291         CMS.Identifier.  hx509_hostname_type: add hostname type for
292         matching.
294         * cert.c (match_general_name): more strict rfc822Name matching.
295         (hx509_verify_hostname): add hostname type for matching.
297 2007-06-19  Love Hörnquist Åstrand  <lha@it.su.se>
299         * hxtool.c: Make compile again.
301         * hxtool.c: Added peap-server for to make windows peap clients
302         happy.
304         * hxtool.c: Unify parse_oid code.
306         * hxtool.c: Implement --content-type.
308         * hxtool-commands.in: Add content-type.
310         * test_cert.in: more cert and keyset tests.
312 2007-06-18  Love Hörnquist Åstrand  <lha@it.su.se>
314         * revoke.c: Avoid stomping on NULL.
316         * revoke.c: Avoid reusing i.
318         * cert.c: Provide __attribute__ for _hx509_abort.
320         * ks_file.c: Fail if not finding iv.
322         * keyset.c: Avoid useing freed memory.
324         * crypto.c: Free memory in failure case.
326         * crypto.c: Free memory in failure case.
328 2007-06-12  Love Hörnquist Åstrand  <lha@it.su.se>
330         * *.c: Add hx509_cert_init_data and use everywhere
332         * hx_locl.h: Now that KEYCHAIN:system-anchors is fast again, use
333         that.
335         * ks_keychain.c: Implement trust anchor support with
336         SecTrustCopyAnchorCertificates.
338         * keyset.c: Set ref to 1 for the new object.
340         * cert.c: Fix logic for allow_default_trust_anchors
342         * keyset.c: Add refcounting to keystores.
344         * cert.c: Change logic for default trust anchors, make it be
345         either default trust anchor, the user supplied, or non at all.
347 2007-06-08  Love Hörnquist Åstrand  <lha@it.su.se>
349         * Makefile.am: Add data/j.pem.
351         * Makefile.am: Add test_windows.in.
352         
353 2007-06-06  Love Hörnquist Åstrand  <lha@it.su.se>
355         * ks_keychain.c: rename functions, leaks less memory and more
356         paranoia.
358         * test_cms.in: Test cms peer-alg.
360         * crypto.c (rsa_create_signature): make oid_id_pkcs1_rsaEncryption
361         mean rsa-with-sha1 but oid oid_id_pkcs1_rsaEncryption in algorithm
362         field.  XXX should probably use another algorithmIdentifier for
363         this.
365         * peer.c: Make free function return void.
367         * cms.c (hx509_cms_create_signed_1): Use hx509_peer_info to select
368         the signature algorithm too.
370         * hxtool-commands.in: Add cms-create-sd --peer-alg.
372         * req.c: Use _hx509_crypto_default_sig_alg.
374         * test_windows.in: Create crl, because everyone needs one.
376         * Makefile.am: add wcrl.crl
377         
378 2007-06-05  Love Hörnquist Åstrand  <lha@it.su.se>
380         * hx_locl.h: Disable KEYCHAIN for now, its slow.
382         * cms.c: When we are not using pkcs7-data, avoid seing
383         signedAttributes since some clients get upset by that (pkcs7 based
384         or just plain broken).
386         * ks_keychain.c: Provide rsa signatures.
388         * ks_keychain.c: Limit the searches to the selected keychain.
390         * ks_keychain.c: include -framework Security specific header files
391         after #ifdef
393         * ks_keychain.c: Find and attach private key (does not provide
394         operations yet though).
396         * ks_p11.c: Prefix rsa method with p11_
398         * ks_keychain.c: Allow opening a specific chain, making "system"
399         special and be the system X509Anchors file. By not specifing any
400         keychain ("KEYCHAIN:"), all keychains are probed.
401         
402 2007-06-04  Love Hörnquist Åstrand  <lha@it.su.se>
404         * hxtool.c (verify): Friendlier error message.
406         * cert.c: Read in and use default trust anchors if they exists.
408         * hx_locl.h: Add concept of default_trust_anchors.
410         * ks_keychain.c: Remove err(), remove extra empty comment, fix
411         _iter function.
413         * error.c (hx509_get_error_string): if the error code is not the
414         one we expect, punt and use the default com_err/strerror string
415         instead.
417         * keyset.c (hx509_certs_merge): its ok to merge in the NULL set of
418         certs.
420         * test_windows.in: Fix status string.
422         * ks_p12.c (store_func): free whole CertBag, not just the data
423         part.
424         
425         * print.c: Check that the self-signed cert is really self-signed.
427         * print.c: Use selfsigned for CRL DP whine, tell if its a
428         self-signed.
430         * print.c: Whine if its a non CA/proxy and doesn't have CRL DP.
432         * ca.c: Add cRLSign to CA certs.
434         * cert.c: Register NULL and KEYCHAIN.
436         * ks_null.c: register the NULL keystore.
438         * Makefile.am: Add ks_keychain.c and related libs.
440         * test_crypto.in: Print certificate with utf8.
442         * print.c: Leak less memory.
444         * hxtool.c: Leak less memory.
446         * print.c: Leak less memory, use functions that does same but
447         more.
449         * name.c (quote_string): don't sign extend the (signed) char to
450         avoid printing too much, add an assert to check that we didn't
451         overrun the buffer.
453         * name.c: Use right element out of the CHOICE for printableString
454         and utf8String
456         * ks_keychain.c: Certificate only KeyChain backend.
458         * name.c: Reset name before parsing it.
459         
460 2007-06-03  Love Hörnquist Åstrand  <lha@it.su.se>
461         
462         * revoke.c (hx509_crl_*): fix sizeof() mistakes to fix memory
463         corruption.
465         * hxtool.c: Add lifetime to crls.
467         * hxtool-commands.in: Add lifetime to crls.
469         * revoke.c: Add lifetime to crls.
471         * test_ca.in: More crl checks.
473         * revoke.c: Add revoking certs.
475         * hxtool-commands.in: argument is certificates.. for crl-sign
477         * hxtool.c (certificate_copy): free lock
479         * revoke.c: Fix hx509_set_error_string calls, add
480         hx509_crl_add_revoked_certs(), implement hx509_crl_{alloc,free}.
482         * hxtool.c (crl_sign): free lock
484         * cert.c (hx509_context_free): free querystat
485         
486 2007-06-02  Love Hörnquist Åstrand  <lha@it.su.se>
488         * test_chain.in: test ocsp-verify
489         
490         * revoke.c (hx509_ocsp_verify): explain what its useful for and
491         provide sane error message.
493         * hx509_err.et: New error code, CERT_NOT_IN_OCSP
495         * hxtool.c: New command ocsp-verify, check if ocsp contains all
496         certs and are valid (exist and non expired).
498         * hxtool-commands.in: New command ocsp-verify.
499         
500 2007-06-01  Love Hörnquist Åstrand  <lha@it.su.se>
502         * test_ca.in: Create crl and verify that is works.
504         * hxtool.c: Sign CRL command.
506         * hx509.h: Add hx509_crl.
508         * hxtool-commands.in: Add crl-sign commands.
510         * revoke.c: Support to generate an empty CRL.
512         * tst-crypto-select2: Switched default types.
514         * tst-crypto-select1: Switched default types.
516         * ca.c: Use default AlgorithmIdentifier.
518         * cms.c: Use default AlgorithmIdentifier.
520         * crypto.c: Provide default AlgorithmIdentifier and use them.
522         * hx_locl.h: Provide default AlgorithmIdentifier.
524         * keyset.c (hx509_certs_find): collects stats for queries.
526         * cert.c: Sort and print more info.
528         * hx_locl.h: Add querystat to hx509_context.
530         * test_*.in: sprinle stat saveing
532         * Makefile.am: Add stat and objdir.
534         * collector.c (_hx509_collector_alloc): return error code instead
535         of pointer.
537         * hxtool.c: Add statistic hook.
539         * ks_file.c: Update _hx509_collector_alloc prototype.
541         * ks_p12.c: Update _hx509_collector_alloc prototype.
543         * ks_p11.c: Update _hx509_collector_alloc prototype.
545         * hxtool-commands.in: Add statistics hook.
547         * cert.c: Statistics printing.
549         * ks_p12.c: plug memory leak
551         * ca.c (hx509_ca_tbs_add_crl_dp_uri): plug memory leak
552         
553 2007-05-31  Love Hörnquist Åstrand  <lha@it.su.se>
555         * print.c: print utf8 type SAN's
557         * Makefile.am: Fix windows client cert name.
559         * test_windows.in: Add crl-uri for the ee certs.
561         * print.c: Printf formating.
563         * ca.c: Add glue for adding CRL dps.
565         * test_ca.in: Readd the crl adding code, it works (somewhat) now.
567         * print.c: Fix printing of CRL DPnames (I hate IMPLICIT encoded
568         structures).
570         * hxtool-commands.in: make ca and alias of certificate-sign
571         
572 2007-05-30  Love Hörnquist Åstrand  <lha@it.su.se>
574         * crypto.c (hx509_crypto_select): copy AI to the right place.
576         * hxtool-commands.in: Add ca --ms-upn.
578         * hxtool.c: add --ms-upn and add more EKU's for pk-init client.
580         * ca.c: Add hx509_ca_tbs_add_san_ms_upn and refactor code.
582         * test_crypto.in: Resurect killed e.
584         * test_crypto.in: check for aes256-cbc
586         * tst-crypto-select7: check for aes256-cbc
588         * test_windows.in: test windows stuff
590         * hxtool.c: add ca --domain-controller option, add secret key
591         option to avaible.
593         * ca.c: Add hx509_ca_tbs_set_domaincontroller.
595         * hxtool-commands.in: add ca --domain-controller
597         * hxtool.c: hook for testing secrety key algs
599         * crypto.c: Add selection code for secret key crypto.
601         * hx509.h: Add HX509_SELECT_SECRET_ENC.
602         
603 2007-05-13  Love Hörnquist Åstrand  <lha@it.su.se>
604         
605         * ks_p11.c: add more mechtypes
606         
607 2007-05-10  Love Hörnquist Åstrand  <lha@it.su.se>
608         
609         * print.c: Indent.
611         * hxtool-commands.in: add test-crypto command
613         * hxtool.c: test crypto command
615         * cms.c (hx509_cms_create_signed_1): if no eContentType is given,
616         use pkcs7-data.
618         * print.c: add Netscape cert comment
620         * crypto.c: Try both the empty password and the NULL
621         password (nothing vs the octet string \x00\x00).
623         * print.c: Add some US Fed PKI oids.
625         * ks_p11.c: Add some more hashes.
626         
627 2007-04-24  Love Hörnquist Åstrand  <lha@it.su.se>
629         * hxtool.c (crypto_select): stop memory leak
630         
631 2007-04-19  Love Hörnquist Åstrand  <lha@it.su.se>
633         * peer.c (hx509_peer_info_free): free memory used too
635         * hxtool.c (crypto_select): only free peer if it was used.
636         
637 2007-04-18  Love Hörnquist Åstrand  <lha@it.su.se>
639         * hxtool.c: free template
641         * ks_mem.c (mem_free): free key array too
643         * hxtool.c: free private key and tbs
645         * hxtool.c (hxtool_ca): free signer
647         * hxtool.c (crypto_available): free peer too.
649         * ca.c (get_AuthorityKeyIdentifier): leak less memory
651         * hxtool.c (hxtool_ca): free SPKI
653         * hxtool.c (hxtool_ca): free cert
655         * ks_mem.c (mem_getkeys): allocate one more the we have elements
656         so its possible to store the NULL pointer at the end.
657         
658 2007-04-16  Love Hörnquist Åstrand  <lha@it.su.se>
659         
660         * Makefile.am: CLEANFILES += cert-null.pem cert-sub-ca2.pem
661         
662 2007-02-05  Love Hörnquist Åstrand  <lha@it.su.se>
663         
664         * ca.c: Disable CRLDistributionPoints for now, its IMPLICIT code
665         in the asn1 parser.
667         * print.c: Add some more \n's.
668         
669 2007-02-03  Love Hörnquist Åstrand  <lha@it.su.se>
670         
671         * file.c: Allow mapping using heim_octet_string.
673         * hxtool.c: Add options to generate detached signatures.
675         * cms.c: Add flags to generate detached signatures.
677         * hx509.h: Flag to generate detached signatures.
679         * test_cms.in: Support detached sigatures.
681         * name.c (hx509_general_name_unparse): unparse the other
682         GeneralName nametypes.
684         * print.c: Use less printf. Use hx509_general_name_unparse.
686         * cert.c: Fix printing and plug leak-on-error.
687         
688 2007-01-31  Love Hörnquist Åstrand  <lha@it.su.se>
689         
690         * test_ca.in: Add test for ca --crl-uri.
692         * hxtool.c: Add ca --crl-uri.
694         * hxtool-commands.in: add ca --crl-uri
696         * ca.c: Code to set CRLDistributionPoints in certificates.
698         * print.c: Check CRLDistributionPointNames.
700         * name.c (hx509_general_name_unparse): function for unparsing
701         GeneralName, only supports GeneralName.URI
703         * cert.c (is_proxy_cert): free info if we wont return it.
704         
705 2007-01-30  Love Hörnquist Åstrand  <lha@it.su.se>
706         
707         * hxtool.c: Try to help how to use this command.
708         
709 2007-01-21  Love Hörnquist Åstrand  <lha@it.su.se>
710         
711         * switch to sha256 as default digest for signing
713 2007-01-20  Love Hörnquist Åstrand  <lha@it.su.se>
715         * test_ca.in: Really test sub-ca code, add basic constraints tests
716         
717 2007-01-17  Love Hörnquist Åstrand  <lha@it.su.se>
718         
719         * Makefile.am: Fix makefile problem.
720         
721 2007-01-16  Love Hörnquist Åstrand  <lha@it.su.se>
723         * hxtool.c: Set num of bits before we generate the key.
724         
725 2007-01-15  Love Hörnquist Åstrand  <lha@it.su.se>
726         
727         * cms.c (hx509_cms_create_signed_1): use hx509_cert_binary
729         * ks_p12.c (store_func): use hx509_cert_binary
731         * ks_file.c (store_func): use hx509_cert_binary
733         * cert.c (hx509_cert_binary): return binary encoded
734         certificate (DER format)
735         
736 2007-01-14  Love Hörnquist Åstrand  <lha@it.su.se>
737         
738         * ca.c (hx509_ca_tbs_subject_expand): new function.
740         * name.c (hx509_name_expand): if env is NULL, return directly
742         * test_ca.in: test template handling
744         * hx509.h: Add template flags.
746         * Makefile.am: clean out new files
748         * hxtool.c: Add certificate template processing, fix hx509_err
749         usage.
751         * hxtool-commands.in: Add certificate template processing.
753         * ca.c: Add certificate template processing. Fix return messages
754         from hx509_ca_tbs_add_eku.
756         * cert.c: Export more stuff from certificate.
757         
758 2007-01-13  Love Hörnquist Åstrand  <lha@it.su.se>
760         * ca.c: update (c)
762         * ca.c: (hx509_ca_tbs_add_eku): filter out dups.
763         
764         * hxtool.c: Add type email and add email eku when using option
765         --email.
767         * Makefile.am: add env.c
769         * name.c: Remove abort, add error handling.
771         * test_name.c: test name expansion
773         * name.c: add hx509_name_expand
775         * env.c: key-value pair help functions
776         
777 2007-01-12  Love Hörnquist Åstrand  <lha@it.su.se>
778         
779         * ca.c: Don't issue certs with subject DN that is NULL and have no
780         SANs
782         * print.c: Fix previous test.
784         * print.c: Check there is a SAN if subject DN is NULL.
786         * test_ca.in: test email, null subject dn
788         * hxtool.c: Allow setting parameters to private key generation.
790         * hx_locl.h: Allow setting parameters to private key generation.
792         * crypto.c: Allow setting parameters to private key generation.
794         * hxtool.c (eval_types): add jid if user gave one
796         * hxtool-commands.in (certificate-sign): add --jid
798         * ca.c (hx509_ca_tbs_add_san_jid): Allow adding
799         id-pkix-on-xmppAddr OtherName.
801         * print.c: Print id-pkix-on-xmppAddr OtherName.
802         
803 2007-01-11  Love Hörnquist Åstrand  <lha@it.su.se>
804         
805         * no random, no RSA/DH tests
807         * hxtool.c (info): print status of random generator
809         * Makefile.am: remove files created by tests
811         * error.c: constify
813         * name.c: constify
815         * revoke.c: constify
817         * hx_locl.h: constify
819         * keyset.c: constify
821         * ks_p11.c: constify
823         * hx_locl.h: make printinfo char * argument const.
825         * cms.c: move _hx509_set_digest_alg from cms.c to crypto.c since
826         its only used there.
828         * crypto.c: remove no longer used stuff, move set_digest_alg here
829         from cms.c since its only used here.
831         * Makefile.am: add data/test-nopw.p12 to EXTRA_DIST
832         
833 2007-01-10  Love Hörnquist Åstrand  <lha@it.su.se>
834         
835         * print.c: BasicConstraints vs criticality bit is complicated and
836         not really possible to evaluate on its own, silly RFC3280.
838         * ca.c: Make basicConstraints critical if this is a CA.
840         * print.c: fix the version vs extension test
842         * print.c: More validation checks.
844         * name.c (hx509_name_cmp): add
845         
846 2007-01-09  Love Hörnquist Åstrand  <lha@it.su.se>
848         * ks_p11.c (collect_private_key): Missing CKA_MODULUS is ok
849         too (XXX why should these be fetched given they are not used).
851         * test_ca.in: rename all files to PEM files, since that is what
852         they are.
854         * hxtool.c: copy out the key with the self signed CA cert
856         * Factor out private key operation out of the signing, operations,
857         support import, export, and generation of private keys. Add
858         support for writing PEM and PKCS12 files with private keys in them.
860         * data/gen-req.sh: Generate a no password pkcs12 file.
861         
862 2007-01-08  Love Hörnquist Åstrand  <lha@it.su.se>
864         * cms.c: Check for internal ASN1 encoder error.
865         
866 2007-01-05  Love Hörnquist Åstrand  <lha@it.su.se>
867         
868         * Makefile.am: Drop most of the pkcs11 files.
870         * test_ca.in: test reissueing ca certificate (xxx time
871         validAfter).
873         * hxtool.c: Allow setting serialNumber (needed for reissuing
874         certificates) Change --key argument to --out-key.
876         * hxtool-commands.in (issue-certificate): Allow setting
877         serialNumber (needed for reissuing certificates), Change --key
878         argument to --out-key.
880         * ref: Replace with Marcus Brinkmann of g10 Code GmbH pkcs11
881         headerfile that is compatible with GPL (file taken from scute)
883 2007-01-04  Love Hörnquist Åstrand  <lha@it.su.se>
885         * test_ca.in: Test to generate key and use them.
887         * hxtool.c: handle other keys the pkcs10 requested keys
889         * hxtool-commands.in: add generate key commands
891         * req.c (_hx509_request_to_pkcs10): PKCS10 needs to have a subject
893         * hxtool-commands.in: Spelling.
895         * ca.c (hx509_ca_tbs_set_proxy): allow negative pathLenConstraint
896         to signal no limit
898         * ks_file.c: Try all formats on the binary file before giving up,
899         this way we can handle binary rsa keys too.
901         * data/key2.der: new test key
903 2007-01-04  David Love  <fx@gnu.org>
905         * Makefile.am (hxtool_LDADD): Add libasn1.la
907         * hxtool.c (pcert_verify): Fix format string.
909 2006-12-31  Love Hörnquist Åstrand  <lha@it.su.se>
911         * hxtool.c: Allow setting path length
913         * cert.c: Fix test for proxy certs chain length, it was too
914         restrictive.
915         
916         * data: regen
917         
918         * data/openssl.cnf: (proxy_cert) make length 0
920         * test_ca.in: Issue a long living cert.
922         * hxtool.c: add --lifetime to ca command.
924         * hxtool-commands.in: add --lifetime to ca command.
926         * ca.c: allow setting notBefore and notAfter.
928         * test_ca.in: Test generation of proxy certificates.
930         * ca.c: Allow generation of proxy certificates, always include
931         BasicConstraints, fix error codes.
933         * hxtool.c: Allow generation of proxy certificates.
935         * test_name.c: make hx509_parse_name take a hx509_context.
937         * name.c: Split building RDN to a separate function.
938         
939 2006-12-30  Love Hörnquist Åstrand  <lha@it.su.se>
940         
941         * Makefile.am: clean test_ca files.
943         * test_ca.in: test issuing self-signed and CA certificates.
945         * hxtool.c: Add bits to allow issuing self-signed and CA
946         certificates.
948         * hxtool-commands.in: Add bits to allow issuing self-signed and CA
949         certificates.
951         * ca.c: Add bits to allow issuing CA certificates.
953         * revoke.c: use new OCSPSigning.
955         * ca.c: Add Subject Key Identifier.
957         * ca.c: Add Authority Key Identifier.
958         
959         * cert.c: Locally export _hx509_find_extension_subject_key_id.
960         Handle AuthorityKeyIdentifier where only authorityCertSerialNumber
961         and authorityCertSerialNumber is set.
963         * hxtool-commands.in: Add dnsname and rfc822 SANs.
965         * test_ca.in: Test dnsname and rfc822 SANs.
967         * ca.c: Add dnsname and rfc822 SANs.
969         * hxtool.c: Add dnsname and rfc822 SANs.
971         * test_ca.in: test adding eku, ku and san to the
972         certificate (https and pk-init)
974         * hxtool.c: Add eku, ku and san to the certificate.
976         * ca.c: Add eku, ku and san to the certificate.
978         * hxtool-commands.in: Add --type and --pk-init-principal
980         * ocsp.asn1: remove id-kp-OCSPSigning, its in rfc2459.asn1 now
981         
982 2006-12-29  Love Hörnquist Åstrand  <lha@it.su.se>
984         * ca.c: Add KeyUsage extension.
986         * Makefile.am: add ca.c, add sign-certificate tests.
988         * crypto.c: Add _hx509_create_signature_bitstring.
990         * hxtool-commands.in: Add the sign-certificate tool.
992         * hxtool.c: Add the sign-certificate tool.
994         * cert.c: Add HX509_QUERY_OPTION_KU_KEYCERTSIGN.
996         * hx509.h: Add hx509_ca_tbs and HX509_QUERY_OPTION_KU_KEYCERTSIGN.
998         * test_ca.in: Basic test of generating a pkcs10 request, signing
999         it and verifying the chain.
1001         * ca.c: Naive certificate signer.
1002         
1003 2006-12-28  Love Hörnquist Åstrand  <lha@it.su.se>
1004         
1005         * hxtool.c: add hxtool_hex
1006         
1007 2006-12-22  Love Hörnquist Åstrand  <lha@it.su.se>
1008         
1009         * Makefile.am: use top_builddir for libasn1.la
1010         
1011 2006-12-11  Love Hörnquist Åstrand  <lha@it.su.se>
1012         
1013         * hxtool.c (print_certificate): print serial number.
1015         * name.c (no): add S=stateOrProvinceName
1016         
1017 2006-12-09  Love Hörnquist Åstrand  <lha@it.su.se>
1018         
1019         * crypto.c (_hx509_private_key_assign_rsa): set a default sig alg
1021         * ks_file.c (try_decrypt): pass down AlgorithmIdentifier that key
1022         uses to do sigatures so there is no need to hardcode RSA into this
1023         function.
1024         
1025 2006-12-08  Love Hörnquist Åstrand  <lha@it.su.se>
1027         * ks_file.c: Pass filename to the parse functions and use it in
1028         the error messages
1030         * test_chain.in: test proxy cert (third level)
1031         
1032         * hx509_err.et: fix errorstring for PROXY_CERT_NAME_WRONG
1034         * data: regen
1036         * Makefile.am: EXTRA_DIST: add
1037         data/proxy10-child-child-test.{key,crt}
1039         * data/gen-req.sh: Fix names and restrictions on the proxy
1040         certificates
1042         * cert.c: Clairfy and make proxy cert handling work for multiple
1043         levels, before it was too restrictive. More helpful error message.
1044         
1045 2006-12-07  Love Hörnquist Åstrand  <lha@it.su.se>
1046         
1047         * cert.c (check_key_usage): tell what keyusages are missing
1049         * print.c: Split OtherName printing code to a oid lookup and print
1050         function.
1052         * print.c (Time2string): print hour as hour not min
1054         * Makefile.am: CLEANFILES += test
1055         
1056 2006-12-06  Love Hörnquist Åstrand  <lha@it.su.se>
1058         * Makefile.am (EXTRA_DIST): add data/pkinit-proxy* files
1060         * Makefile.am (EXTRA_DIST): add tst-crypto* files
1062         * cert.c (hx509_query_match_issuer_serial): make a copy of the
1063         data
1065         * cert.c (hx509_query_match_issuer_serial): allow matching on
1066         issuer and serial num
1068         * cert.c (_hx509_calculate_path): add flag to allow leaving out
1069         trust anchor
1071         * cms.c (hx509_cms_create_signed_1): when building the path, omit
1072         the trust anchors.
1074         * crypto.c (rsa_create_signature): Abort when signature is longer,
1075         not shorter.
1077         * cms.c: Provide time to _hx509_calculate_path so we don't send no
1078         longer valid certs to our peer.
1080         * cert.c (find_parent): when checking for certs and its not a
1081         trust anchor, require time be in range.
1082         (_hx509_query_match_cert): Add time validity-testing to query mask
1084         * hx_locl.h: add time validity-testing to query mask
1086         * test_cms.in: Tests for CMS SignedData with incomplete chain from
1087         the signer.
1088         
1089 2006-11-28  Love Hörnquist Åstrand  <lha@it.su.se>
1091         * cms.c (hx509_cms_verify_signed): specify what signature we
1092         failed to verify
1093         
1094         * Makefile.am: Depend on LIB_com_err for AIX.
1096         * keyset.c: Remove anther strndup that causes AIX to fall over.
1098         * cert.c: Don't check the trust anchors expiration time since they
1099         are transported out of band, from RFC3820.
1101         * cms.c: sprinkle more error strings
1103         * crypto.c: sprinkle more error strings
1105         * hxtool.c: use unsigned int as counter to fit better with the
1106         asn1 compiler
1108         * crypto.c: use unsigned int as counter to fit better with the
1109         asn1 compiler
1110         
1111 2006-11-27  Love Hörnquist Åstrand  <lha@it.su.se>
1112         
1113         * cms.c: Remove trailing white space.
1115         * crypto.c: rewrite comment to make more sense
1117         * crypto.c (hx509_crypto_select): check sig_algs[j]->key_oid
1119         * hxtool-commands.in (crypto-available): add --type
1121         * crypto.c (hx509_crypto_available): let alg pass if its keyless
1123         * hxtool-commands.in: Expand crypto-select
1125         * cms.c: Rename hx509_select to hx509_crypto_select.
1127         * hxtool-commands.in: Add crypto-select and crypto-available.
1129         * hxtool.c: Add crypto-select and crypto-available.
1131         * crypto.c (hx509_crypto_available): use right index.
1132         (hx509_crypto_free_algs): new function
1134         * crypto.c (hx509_crypto_select): improve
1135         (hx509_crypto_available): new function
1136         
1137 2006-11-26  Love Hörnquist Åstrand  <lha@it.su.se>
1138         
1139         * cert.c: Sprinkle more error string and hx509_contexts.
1141         * cms.c: Sprinkle more error strings.
1143         * crypto.c: Sprinkle error string and hx509_contexts.
1145         * crypto.c: Add some more comments about how this works.
1147         * crypto.c (hx509_select): new function.
1148         
1149         * Makefile.am: add peer.c
1151         * hxtool.c: Update hx509_cms_create_signed_1.
1153         * hx_locl.h: add struct hx509_peer_info
1155         * peer.c: Allow selection of digest/sig-alg
1157         * cms.c: Allow selection of a better digest using hx509_peer_info.
1159         * revoke.c: Handle that _hx509_verify_signature takes a context.
1160         
1161         * cert.c: Handle that _hx509_verify_signature takes a context.
1162         
1163 2006-11-25  Love Hörnquist Åstrand  <lha@it.su.se>
1165         * cms.c: Sprinkle error strings.
1167         * crypto.c: Sprinkle context and error strings.
1168         
1169 2006-11-24  Love Hörnquist Åstrand  <lha@it.su.se>
1171         * name.c: Handle printing and parsing raw oids in name.
1173 2006-11-23  Love Hörnquist Åstrand  <lha@it.su.se>
1175         * cert.c (_hx509_calculate_path): allow to calculate optimistic
1176         path when we don't know the trust anchors, just follow the chain
1177         upward until we no longer find a parent or we hit the max limit.
1179         * cms.c (hx509_cms_create_signed_1): provide a best effort path to
1180         the trust anchors to be stored in the SignedData packet, if find
1181         parents until trust anchor or max length.
1183         * data: regen
1185         * data/gen-req.sh: Build pk-init proxy cert.
1186         
1187 2006-11-16  Love Hörnquist Åstrand  <lha@it.su.se>
1188         
1189         * error.c (hx509_get_error_string): Put ", " between strings in
1190         error message.
1191         
1192 2006-11-13  Love Hörnquist Åstrand  <lha@it.su.se>
1194         * data/openssl.cnf: Change realm to TEST.H5L.SE
1195         
1196 2006-11-07  Love Hörnquist Åstrand  <lha@it.su.se>
1198         * revoke.c: Sprinkle error strings.
1199         
1200 2006-11-04  Love Hörnquist Åstrand  <lha@it.su.se>
1201         
1202         * hx_locl.h: add context variable to cmp function.
1204         * cert.c (hx509_query_match_cmp_func): allow setting the match
1205         function.
1206         
1207 2006-10-24  Love Hörnquist Åstrand  <lha@it.su.se>
1209         * ks_p11.c: Return less EINVAL.
1211         * hx509_err.et: add more pkcs11 errors
1213         * hx509_err.et: more error-codes
1215         * revoke.c: Return less EINVAL.
1217         * ks_dir.c: sprinkel more hx509_set_error_string
1219         * ks_file.c: Return less EINVAL.
1221         * hxtool.c: Pass in context to _hx509_parse_private_key.
1223         * ks_file.c: Sprinkle more hx509_context so we can return propper
1224         errors.
1226         * hx509_err.et: add HX509_PARSING_KEY_FAILED
1228         * crypto.c: Sprinkle more hx509_context so we can return propper
1229         errors.
1231         * collector.c: No more EINVAL.
1233         * hx509_err.et: add HX509_LOCAL_ATTRIBUTE_MISSING
1235         * cert.c (hx509_cert_get_base_subject): one less EINVAL
1236         (_hx509_cert_private_decrypt): one less EINVAL
1237         
1238 2006-10-22  Love Hörnquist Åstrand  <lha@it.su.se>
1240         * collector.c: indent
1242         * hxtool.c: Try to not leak memory.
1244         * req.c: clean memory before free
1246         * crypto.c (_hx509_private_key2SPKI): indent
1248         * req.c: Try to not leak memory.
1249         
1250 2006-10-21  Love Hörnquist Åstrand  <lha@it.su.se>
1252         * test_crypto.in: Read 50 kilobyte random data
1253         
1254         * revoke.c: Try to not leak memory.
1256         * hxtool.c: Try to not leak memory.
1258         * crypto.c (hx509_crypto_destroy): free oid.
1260         * error.c: Clean error string on failure just to make sure.
1262         * cms.c: Try to not leak memory (again).
1264         * hxtool.c: use a sensable content type
1266         * cms.c: Try harder to free certificate.
1267         
1268 2006-10-20  Love Hörnquist Åstrand  <lha@it.su.se>
1270         * Makefile.am: Add make check data.
1271         
1272 2006-10-19  Love Hörnquist Åstrand  <lha@it.su.se>
1273         
1274         * ks_p11.c (p11_list_keys): make element of search_data[0]
1275         constants and set them later
1277         * Makefile.am: Add more files.
1278         
1279 2006-10-17  Love Hörnquist Åstrand  <lha@it.su.se>
1280         
1281         * ks_file.c: set ret, remember to free ivdata
1282         
1283 2006-10-16  Love Hörnquist Åstrand  <lha@it.su.se>
1285         * hx_locl.h: Include <parse_bytes.h>.
1287         * test_crypto.in: Test random-data.
1289         * hxtool.c: RAND_bytes() return 1 for cryptographic strong data,
1290         check for that.
1292         * Makefile.am: clean random-data
1294         * hxtool.c: Add random-data command, use sl_slc_help.
1296         * hxtool-commands.in: Add random-data.
1298         * ks_p12.c: Remember to release certs.
1300         * ks_p11.c: Remember to release certs.
1301         
1302 2006-10-14  Love Hörnquist Åstrand  <lha@it.su.se>
1303         
1304         * prefix der primitives with der_
1306         * lock.c: Match the prompt type PROMPT exact.
1308         * hx_locl.h: Drop heim_any.h
1309         
1310 2006-10-11  Love Hörnquist Åstrand  <lha@it.su.se>
1311         
1312         * ks_p11.c (p11_release_module): j needs to be used as inter loop
1313         index. From Douglas Engert.
1315         * ks_file.c (parse_rsa_private_key): try all passwords and
1316         prompter.
1317         
1318 2006-10-10  Love Hörnquist Åstrand  <lha@it.su.se>
1319         
1320         * test_*.in: Parameterise the invocation of hxtool, so we can make
1321         it run under TESTS_ENVIRONMENT. From Andrew Bartlett
1323 2006-10-08  Love Hörnquist Åstrand  <lha@it.su.se>
1325         * test_crypto.in: Put all test stuck at 2006-09-25 since all their
1326         chains where valied then.
1328         * hxtool.c: Implement --time= option.
1330         * hxtool-commands.in: Add option time.
1332         * Makefile.am: test_name is a PROGRAM_TESTS
1334         * ks_p11.c: Return HX509_PKCS11_NO_SLOT when there are no slots
1335         and HX509_PKCS11_NO_TOKEN when there are no token. For use in PAM
1336         modules that want to detect when to use smartcard login and when
1337         not to. Patched based on code from Douglas Engert.
1339         * hx509_err.et: Add new pkcs11 related errors in a new section:
1340         keystore related error.  Patched based on code from Douglas
1341         Engert.
1342         
1343 2006-10-07  Love Hörnquist Åstrand  <lha@it.su.se>
1345         * Makefile.am: Make depenency for slc built files just like
1346         everywhere else.
1348         * cert.c: Add all openssl algs and init asn1 et
1349         
1350 2006-10-06  Love Hörnquist Åstrand  <lha@it.su.se>
1352         * ks_file.c (parse_rsa_private_key): free type earlier.
1354         * ks_file.c (parse_rsa_private_key): free type after use
1356         * name.c (_hx509_Name_to_string): remove dup const
1357         
1358 2006-10-02  Love Hörnquist Åstrand  <lha@it.su.se>
1359         
1360         * Makefile.am: Add more libs to libhx509
1361         
1362 2006-10-01  Love Hörnquist Åstrand  <lha@it.su.se>
1364         * ks_p11.c: Fix double free's, NULL ptr de-reference, and conform
1365         better to pkcs11.  From Douglas Engert.
1367         * ref: remove ^M, it breaks solaris 10s cc. From Harald Barth
1369 2006-09-19  Love Hörnquist Åstrand  <lha@it.su.se>
1371         * test_crypto.in: Bleichenbacher bad cert from Ralf-Philipp
1372         Weinmann and Andrew Pyshkin, pad right.
1374         * data: starfield test root cert and Ralf-Philipp and Andreis
1375         correctly padded bad cert
1377 2006-09-15  Love Hörnquist Åstrand  <lha@it.su.se>
1379         * test_crypto.in: Add test for yutaka certs.
1381         * cert.c: Add a strict rfc3280 verification flag. rfc3280 requires
1382         certificates to have KeyUsage.keyCertSign if they are to be used
1383         for signing of certificates, but the step in the verifiation is
1384         optional.
1386         * hxtool.c: Improve printing and error reporting.
1387         
1388 2006-09-13  Love Hörnquist Åstrand  <lha@it.su.se>
1390         * test_crypto.in,Makefile.am,data/bleichenbacher-{bad,good}.pem:
1391         test bleichenbacher from eay
1393 2006-09-12  Love Hörnquist Åstrand  <lha@it.su.se>
1395         * hxtool.c: Make common function for all getarg_strings and
1396         hx509_certs_append commonly used.
1398         * cms.c: HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT is a negative
1399         flag, treat it was such.
1400         
1401 2006-09-11  Love Hörnquist Åstrand  <lha@it.su.se>
1403         * req.c: Use the new add_GeneralNames function.
1405         * hx509.h: Add HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT.
1407         * ks_p12.c: Adapt to new signature of hx509_cms_unenvelope.
1409         * hxtool.c: Adapt to new signature of hx509_cms_unenvelope.
1411         * cms.c: Allow passing in encryptedContent and flag.  Add new flag
1412         HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT.
1413         
1414 2006-09-08  Love Hörnquist Åstrand  <lha@it.su.se>
1415         
1416         * ks_p11.c: cast void * to char * when using it for %s formating
1417         in printf.
1419         * name.c: New function _hx509_Name_to_string.
1420         
1421 2006-09-07  Love Hörnquist Åstrand  <lha@it.su.se>
1423         * ks_file.c: Sprinkle error messages.
1425         * cms.c: Sprinkle even more error messages.
1426         
1427         * cms.c: Sprinkle some error messages.
1429         * cms.c (find_CMSIdentifier): only free string when we allocated
1430         one.
1432         * ks_p11.c: Don't build most of the pkcs11 module if there are no
1433         dlopen().
1434         
1435 2006-09-06  Love Hörnquist Åstrand  <lha@it.su.se>
1437         * cms.c (hx509_cms_unenvelope): try to save the error string from
1438         find_CMSIdentifier so we have one more bit of information what
1439         went wrong.
1441         * hxtool.c: More pretty printing, make verify_signed return the
1442         error string from the library.
1444         * cms.c: Try returning what certificates failed to parse or be
1445         found.
1447         * ks_p11.c (p11_list_keys): fetch CKA_LABEL and use it to set the
1448         friendlyname for the certificate.
1449         
1450 2006-09-05  Love Hörnquist Åstrand  <lha@it.su.se>
1451         
1452         * crypto.c: check that there are no extra bytes in the checksum
1453         and that the parameters are NULL or the NULL-type. All to avoid
1454         having excess data that can be used to fake the signature.
1456         * hxtool.c: print keyusage
1458         * print.c: add hx509_cert_keyusage_print, simplify oid printing
1460         * cert.c: add _hx509_cert_get_keyusage
1462         * ks_p11.c: keep one session around for the whole life of the keyset
1464         * test_query.in: tests more selection
1466         * hxtool.c: improve pretty printing in print and query
1468         * hxtool{.c,-commands.in}: add selection on KU and printing to query
1470         * test_cms.in: Add cms test for digitalSignature and
1471         keyEncipherment certs.
1473         * name.c (no): Add serialNumber
1475         * ks_p11.c (p11_get_session): return better error messages
1476         
1477 2006-09-04  Love Hörnquist Åstrand  <lha@it.su.se>
1479         * ref: update to pkcs11 reference files 2.20
1481         * ks_p11.c: add more mechflags
1483         * name.c (no): add OU and sort
1485         * revoke.c: pass context to _hx509_create_signature
1487         * ks_p11.c (p11_printinfo): print proper plural s
1489         * ks_p11.c: save the mechs supported when initing the token, print
1490         them in printinfo.
1492         * hx_locl.h: Include <parse_units.h>.
1494         * cms.c: pass context to _hx509_create_signature
1496         * req.c: pass context to _hx509_create_signature
1498         * keyset.c (hx509_certs_info): print information about the keyset.
1500         * hxtool.c (pcert_print) print keystore info when --info flag is
1501         given.
1503         * hxtool-commands.in: Add hxtool print --info.
1505         * test_query.in: Test hxtool print --info.
1507         * hx_locl.h (hx509_keyset_ops): add printinfo
1509         * crypto.c: Start to hang the private key operations of the
1510         private key, pass hx509_context to create_checksum.
1511         
1512 2006-05-29  Love Hörnquist Åstrand  <lha@it.su.se>
1514         * ks_p11.c: Iterate over all slots, not just the first/selected
1515         one.
1516         
1517 2006-05-27  Love Hörnquist Åstrand  <lha@it.su.se>
1519         * cert.c: Add release function for certifiates so backend knowns
1520         when its no longer used.
1522         * ks_p11.c: Add reference counting on certifiates, push out
1523         CK_SESSION_HANDLE from slot.
1525         * cms.c: sprinkle more hx509_clear_error_string
1527 2006-05-22  Love Hörnquist Åstrand  <lha@it.su.se>
1529         * ks_p11.c: Sprinkle some hx509_set_error_strings
1530         
1531 2006-05-13  Love Hörnquist Åstrand  <lha@it.su.se>
1532         
1533         * hxtool.c: Avoid shadowing.
1535         * revoke.c: Avoid shadowing.
1537         * ks_file.c: Avoid shadowing.
1539         * cert.c: Avoid shadowing.
1540         
1541 2006-05-12  Love Hörnquist Åstrand  <lha@it.su.se>
1543         * lock.c (hx509_prompt_hidden): reshuffle to avoid gcc warning
1544         
1545         * hx509.h: Reshuffle the prompter types, remove the hidden field.
1547         * lock.c (hx509_prompt_hidden): return if the prompt should be
1548         hidden or not
1550         * revoke.c (hx509_revoke_free): allow free of NULL.
1551         
1552 2006-05-11  Love Hörnquist Åstrand  <lha@it.su.se>
1554         * ks_file.c (file_init): Avoid shadowing ret (and thus avoiding
1555         crashing).
1557         * ks_dir.c: Implement DIR: caches useing FILE: caches.
1559         * ks_p11.c: Catch more errors.
1560         
1561 2006-05-08  Love Hörnquist Åstrand  <lha@it.su.se>
1562         
1563         * crypto.c (hx509_crypto_encrypt): free correctly in error
1564         path. From Andrew Bartlett.
1566         * crypto.c: If RAND_bytes fails, then we will attempt to
1567         double-free crypt->key.data.  From Andrew Bartlett.
1568         
1569 2006-05-05  Love Hörnquist Åstrand  <lha@it.su.se>
1570         
1571         * name.c: Rename u_intXX_t to uintXX_t
1572         
1573 2006-05-03  Love Hörnquist Åstrand  <lha@it.su.se>
1575         * TODO: More to do about the about the PKCS11 code.
1577         * ks_p11.c: Use the prompter from the lock function.
1579         * lock.c: Deal with that hx509_prompt.reply is no longer a
1580         pointer.
1582         * hx509.h: Make hx509_prompt.reply not a pointer.
1583         
1584 2006-05-02  Love Hörnquist Åstrand  <lha@it.su.se>
1586         * keyset.c: Sprinkle setting error strings.
1588         * crypto.c: Sprinkle setting error strings.
1590         * collector.c: Sprinkle setting error strings.
1592         * cms.c: Sprinkle setting error strings.
1593         
1594 2006-05-01  Love Hörnquist Åstrand  <lha@it.su.se>
1595         
1596         * test_name.c: renamed one error code
1598         * name.c: renamed one error code
1600         * ks_p11.c: _hx509_set_cert_attribute changed signature
1602         * hxtool.c (pcert_print): use hx509_err so I can test it
1604         * error.c (hx509_set_error_stringv): clear errors on malloc
1605         failure
1607         * hx509_err.et: Add some more errors
1609         * cert.c: Sprinkle setting error strings.
1611         * cms.c: _hx509_path_append changed signature.
1613         * revoke.c: changed signature of _hx509_check_key_usage
1615         * keyset.c: changed signature of _hx509_query_match_cert
1617         * hx509.h: Add support for error strings.
1619         * cms.c: changed signature of _hx509_check_key_usage
1621         * Makefile.am: ibhx509_la_files += error.c
1623         * ks_file.c: Sprinkel setting error strings.
1625         * cert.c: Sprinkel setting error strings.
1627         * hx_locl.h: Add support for error strings.
1629         * error.c: Add string error handling functions.
1631         * keyset.c (hx509_certs_init): pass the right error code back
1632         
1633 2006-04-30  Love Hörnquist Åstrand  <lha@it.su.se>
1635         * revoke.c: Revert previous patch.
1636         (hx509_ocsp_verify): new function that returns the expiration of
1637         certificate in ocsp data-blob
1639         * cert.c: Reverse previous patch, lets do it another way.
1641         * cert.c (hx509_revoke_verify): update usage
1643         * revoke.c: Make compile.
1645         * revoke.c: Add the expiration time the crl/ocsp info expire
1647         * name.c: Add hx509_name_is_null_p
1649         * cert.c: remove _hx509_cert_private_sigature
1650         
1651 2006-04-29  Love Hörnquist Åstrand  <lha@it.su.se>
1652         
1653         * name.c: Expose more of Name.
1655         * hxtool.c (main): add missing argument to printf
1657         * data/openssl.cnf: Add EKU for the KDC certificate
1659         * cert.c (hx509_cert_get_base_subject): reject un-canon proxy
1660         certs, not the reverse
1661         (add_to_list): constify and fix argument order to
1662         copy_octet_string
1663         (hx509_cert_find_subjectAltName_otherName): make work
1664         
1665 2006-04-28  Love Hörnquist Åstrand  <lha@it.su.se>
1667         * data/{pkinit,kdc}.{crt,key}: pkinit certificates
1669         * data/gen-req.sh: Generate pkinit certificates.
1671         * data/openssl.cnf: Add pkinit glue.
1673         * cert.c (hx509_verify_hostname): implement stub function
1674         
1675 2006-04-27  Love Hörnquist Åstrand  <lha@it.su.se>
1677         * TODO: CRL delta support
1679 2006-04-26 Love Hörnquist Åstrand <lha@it.su.se>
1680         
1681         * data/.cvsignore: ignore leftover from OpenSSL cert generation
1683         * hx509_err.et: Add name malformated error
1685         * name.c (hx509_parse_name): don't abort on error, rather return
1686         error
1688         * test_name.c: Test failure parsing name.
1690         * cert.c: When verifying certificates, store subject basename for
1691         later consumption.
1693         * test_name.c: test to parse and print name and check that they
1694         are the same.
1696         * name.c (hx509_parse_name): fix length argument to printf string
1698         * name.c (hx509_parse_name): fix length argument to stringtooid, 1
1699         too short.
1701         * cert.c: remove debug printf's
1703         * name.c (hx509_parse_name): make compile pre c99
1705         * data/gen-req.sh: OpenSSL have a serious issue of user confusion
1706         -subj in -ca takes the arguments in LDAP order. -subj for x509
1707         takes it in x509 order.
1709         * cert.c (hx509_verify_path): handle the case where the where two
1710         proxy certs in a chain.
1712         * test_chain.in: enable two proxy certificates in a chain test
1714         * test_chain.in: tests proxy certificates
1716         * data: re-gen
1718         * data/gen-req.sh: build proxy certificates
1719         
1720         * data/openssl.cnf: add def for proxy10_cert
1722         * hx509_err.et: Add another proxy certificate error.
1724         * cert.c (hx509_verify_path): Need to mangle name to remove the CN
1725         of the subject, copying issuer only works for one level but is
1726         better then doing no checking at all.
1728         * hxtool.c: Add verify --allow-proxy-certificate.
1730         * hxtool-commands.in: add verify --allow-proxy-certificate
1732         * hx509_err.et: Add proxy certificate errors.
1734         * cert.c: Fix comment about subject name of proxy certificate.
1736         * test_chain.in: tests for proxy certs
1738         * data/gen-req.sh: gen proxy and non-proxy tests certificates
1740         * data/openssl.cnf: Add definition for proxy certs
1742         * data/*proxy-test.*: Add proxy certificates
1744         * cert.c (hx509_verify_path): verify proxy certificate have no san
1745         or ian
1747         * cert.c (hx509_verify_set_proxy_certificate): Add
1748         (*): rename policy cert to proxy cert
1750         * cert.c: Initial support for proxy certificates.
1751         
1752 2006-04-24  Love Hörnquist Åstrand  <lha@it.su.se>
1754         * hxtool.c: some error checking
1756         * name.c: Switch over to asn1 generaed oids.
1758         * TODO: merge with old todo file
1759         
1760 2006-04-23 Love Hörnquist Åstrand <lha@it.su.se>
1762         * test_query.in: make quiet
1764         * test_req.in: SKIP test if there is no RSA support.
1766         * hxtool.c: print dh method too
1768         * test_chain.in: SKIP test if there is no RSA support.
1769         
1770         * test_cms.in: SKIP test if there is no RSA support.
1772         * test_nist.in: SKIP test if there is no RSA support.
1773         
1774 2006-04-22  Love Hörnquist Åstrand  <lha@it.su.se>
1776         * hxtool-commands.in: Allow passing in pool and anchor to
1777         signedData
1779         * hxtool.c: Allow passing in pool and anchor to signedData
1781         * test_cms.in: Test that certs in signed data is picked up.
1783         * hx_locl.h: Expose the path building function to internal
1784         functions.
1786         * cert.c: Expose the path building function to internal functions.
1788         * hxtool-commands.in: cms-envelope: Add support for choosing the
1789         encryption type
1791         * hxtool.c (cms_create_enveloped): Add support for choosing the
1792         encryption type
1794         * test_cms.in: Test generating des-ede3 aes-128 aes-256 enveloped
1795         data
1797         * crypto.c: Add names to cipher types.
1799         * cert.c (hx509_query_match_friendly_name): fix return value
1801         * data/gen-req.sh: generate tests for enveloped data using
1802         des-ede3 and aes256
1804         * test_cms.in: add tests for enveloped data using des-ede3 and
1805         aes256
1807         * cert.c (hx509_query_match_friendly_name): New function.
1808         
1809 2006-04-21  Love Hörnquist Åstrand  <lha@it.su.se>
1810         
1811         * ks_p11.c: Add support for parsing slot-number.
1813         * crypto.c (oid_private_rc2_40): simply
1815         * crypto.c: Use oids from asn1 generator.
1817         * ks_file.c (file_init): reset length when done with a part
1819         * test_cms.in: check with test.combined.crt.
1821         * data/gen-req.sh: Create test.combined.crt.
1823         * test_cms.in: Test signed data using keyfile that is encrypted.
1825         * ks_file.c: Remove (commented out) debug printf
1827         * ks_file.c (parse_rsa_private_key): use EVP_get_cipherbyname
1829         * ks_file.c (parse_rsa_private_key): make working for one
1830         password.
1832         * ks_file.c (parse_rsa_private_key): Implement enought for
1833         testing.
1835         * hx_locl.h: Add <ctype.h>
1837         * ks_file.c: Add glue code for PEM encrypted password files.
1839         * test_cms.in: Add commeted out password protected PEM file,
1840         remove password for those tests that doesn't need it.
1842         * test_cms.in: adapt test now that we can use any certificate and
1843         trust anchor
1845         * collector.c: handle PEM RSA PRIVATE KEY files
1847         * cert.c: Remove unused function.
1849         * ks_dir.c: move code here from ks_file.c now that its no longer
1850         used.
1852         * ks_file.c: Add support for parsing unencrypted RSA PRIVATE KEY
1854         * crypto.c: Handle rsa private keys better.
1855         
1856 2006-04-20  Love Hörnquist Åstrand <lha@it.su.se>
1858         * hxtool.c: Use hx509_cms_{,un}wrap_ContentInfo
1860         * cms.c: Make hx509_cms_{,un}wrap_ContentInfo usable in asn1
1861         un-aware code.
1863         * cert.c (hx509_verify_path): if trust anchor is not self signed,
1864         don't check sig From Douglas Engert.
1866         * test_chain.in: test "sub-cert -> sub-ca"
1867         
1868         * crypto.c: Use the right length for the sha256 checksums.
1869         
1870 2006-04-15  Love Hörnquist Åstrand  <lha@it.su.se>
1872         * crypto.c: Fix breakage from sha256 code.
1874         * crypto.c: Add SHA256 support, and symbols for the other new
1875         SHA-2 types.
1876         
1877 2006-04-14  Love Hörnquist Åstrand  <lha@it.su.se>
1879         * test_cms.in: test rc2-40 rc2-64 rc2-128 enveloped data
1880         
1881         * data/test-enveloped-rc2-{40,64,128}: add tests cases for rc2
1883         * cms.c: Update prototypes changes for hx509_crypto_[gs]et_params.
1885         * crypto.c: Break out the parameter handling code for encrypting
1886         data to handle RC2.  Needed for Windows 2k pk-init support.
1887         
1888 2006-04-04  Love Hörnquist Åstrand <lha@it.su.se>
1890         * Makefile.am: Split libhx509_la_SOURCES into build file and
1891         distributed files so we can avoid building prototypes for
1892         build-files.
1893         
1894 2006-04-03  Love Hörnquist Åstrand  <lha@it.su.se>
1896         * TODO: split certificate request into pkcs10 and CRMF
1898         * hxtool-commands.in: Add nonce flag to ocsp-fetch
1900         * hxtool.c: control sending nonce
1902         * hxtool.c (request_create): store the request in a file, no in
1903         bitbucket.
1905         * cert.c: expose print_cert_subject internally
1907         * hxtool.c: Add ocsp_print.
1909         * hxtool-commands.in: New command "ocsp-print".
1911         * hx_locl.h: Include <hex.h>.
1913         * revoke.c (verify_ocsp): require issuer to match too.
1914         (free_ocsp): new function
1915         (hx509_revoke_ocsp_print): new function, print ocsp reply
1917         * Makefile.am: build CRMF files
1919         * data/key.der: needed for cert request test
1921         * test_req.in: adapt to rename of pkcs10-create to request-create
1923         * hxtool.c: adapt to rename of pkcs10-create to request-create
1925         * hxtool-commands.in: Rename pkcs10-create to request-create
1927         * crypto.c: (_hx509_parse_private_key): Avoid crashing on bad input.
1929         * hxtool.c (pkcs10_create): use opt->subject_string
1931         * hxtool-commands.in: Add pkcs10-create --subject
1933         * Makefile.am: Add test_req to tests.
1934         
1935         * test_req.in: Test for pkcs10 commands.
1937         * name.c (hx509_parse_name): new function.
1939         * hxtool.c (pkcs10_create): implement
1941         * hxtool-commands.in (pkcs10-create): Add arguments
1943         * crypto.c: Add _hx509_private_key2SPKI and support
1944         functions (only support RSA for now).
1945         
1946 2006-04-02  Love Hörnquist Åstrand  <lha@it.su.se>
1947         
1948         * hxtool-commands.in: Add pkcs10-create command.
1950         * hx509.h: Add hx509_request.
1952         * TODO: more stuff
1954         * Makefile.am: Add req.c
1956         * req.c: Create certificate requests, prototype converts the
1957         request in a pkcs10 packet.
1959         * hxtool.c: Add pkcs10_create
1961         * name.c (hx509_name_copy): new function.
1962         
1963 2006-04-01  Love Hörnquist Åstrand  <lha@it.su.se>
1965         * TODO: fill out what do
1967         * hxtool-commands.in: add pkcs10-print
1969         * hx_locl.h: Include <pkcs10_asn1.h>.
1971         * pkcs10.asn1: PKCS#10
1973         * hxtool.c (pkcs10_print): new function.
1975         * test_chain.in: test ocsp keyhash
1977         * data: generate ocsp keyhash version too
1979         * revoke.c (load_ocsp): test that we got back a BasicReponse
1981         * ocsp.asn1: Add asn1_id_pkix_ocsp*.
1983         * Makefile.am: Add asn1_id_pkix_ocsp*.
1985         * cert.c: Add HX509_QUERY_MATCH_KEY_HASH_SHA1
1987         * hx_locl.h: Add HX509_QUERY_MATCH_KEY_HASH_SHA1
1989         * revoke.c: Support OCSPResponderID.byKey, indent.
1991         * revoke.c (hx509_ocsp_request): Add nonce to ocsp request.
1993         * hxtool.c: Add nonce to ocsp request.
1995         * test_chain.in: Added crl tests
1996         
1997         * data/nist-data: rename missing-crl to missing-revoke
1999         * data: make ca use openssl ca command so we can add ocsp tests,
2000         and regen certs
2002         * test_chain.in: Add revoked ocsp cert test
2004         * cert.c: rename missing-crl to missing-revoke
2006         * revoke.c: refactor code, fix a un-init-ed variable
2007         
2008         * test_chain.in: rename missing-crl to missing-revoke add ocsp
2009         tests
2011         * test_cms.in: rename missing-crl to missing-revoke
2013         * hxtool.c: rename missing-crl to missing-revoke
2015         * hxtool-commands.in: rename missing-crl to missing-revoke
2016         
2017         * revoke.c: Plug one memory leak.
2019         * revoke.c: Renamed generic CRL related errors.
2020         
2021         * hx509_err.et: Comments and renamed generic CRL related errors
2022         
2023         * revoke.c: Add ocsp checker.
2025         * ocsp.asn1: Add id-kp-OCSPSigning
2027         * hxtool-commands.in: add url-path argument to ocsp-fetch
2029         * hxtool.c: implement ocsp-fetch
2031         * cert.c: Use HX509_DEFAULT_OCSP_TIME_DIFF.
2032         
2033         * hx_locl.h: Add ocsp_time_diff to hx509_context
2035         * crypto.c (_hx509_verify_signature_bitstring): new function,
2036         commonly use when checking certificates
2038         * cms.c (hx509_cms_envelope_1): check for internal ASN.1 encoder
2039         error
2041         * cert.c: Add ocsp glue, use new
2042         _hx509_verify_signature_bitstring, add eku checking function.
2043         
2044 2006-03-31  Love Hörnquist Åstrand  <lha@it.su.se>
2046         * Makefile.am: add id_kp_OCSPSigning.x
2048         * revoke.c: Pick out certs in ocsp response
2050         * TODO: list of stuff to verify
2052         * revoke.c: Add code to load OCSPBasicOCSPResponse files, reload
2053         crl when its changed on disk.
2055         * cert.c: Update for ocsp merge. handle building path w/o
2056         subject (using subject key id)
2058         * ks_p12.c: _hx509_map_file changed prototype.
2060         * file.c: _hx509_map_file changed prototype, returns struct stat
2061         if requested.
2063         * ks_file.c: _hx509_map_file changed prototype.
2065         * hxtool.c: Add stub for ocsp-fetch, _hx509_map_file changed
2066         prototype, add ocsp parsing to verify command.
2068         * hx_locl.h: rename HX509_CTX_CRL_MISSING_OK to
2069         HX509_CTX_VERIFY_MISSING_OK now that we have OCSP glue
2070         
2071 2006-03-30  Love Hörnquist Åstrand  <lha@it.su.se>
2073         * hx_locl.h: Add <krb5-types.h> to make it compile on Solaris,
2074         from Alex V. Labuta.
2075         
2076 2006-03-28  Love Hörnquist Åstrand  <lha@it.su.se>
2077         
2078         * crypto.c (_hx509_pbe_decrypt): try all passwords, not just the
2079         first one.
2080         
2081 2006-03-27  Love Hörnquist Åstrand  <lha@it.su.se>
2083         * print.c (check_altName): Print the othername oid.
2085         * crypto.c: Manual page claims RSA_public_decrypt will return -1
2086         on error, lets check for that
2087         
2088         * crypto.c (_hx509_pbe_decrypt): also try the empty password
2090         * collector.c (match_localkeyid): no need to add back the cert to
2091         the cert pool, its already there.
2093         * crypto.c: Add REQUIRE_SIGNER
2095         * cert.c (hx509_cert_free): ok to free NULL
2097         * hx509_err.et: Add new error code SIGNATURE_WITHOUT_SIGNER.
2099         * name.c (_hx509_name_ds_cmp): make DirectoryString case
2100         insenstive
2101         (hx509_name_to_string): less spacing
2103         * cms.c: Check for signature error, check consitency of error
2104         
2105 2006-03-26  Love Hörnquist Åstrand  <lha@it.su.se>
2107         * collector.c (_hx509_collector_alloc): handle errors
2109         * cert.c (hx509_query_alloc): allocate slight more more then a
2110         sizeof(pointer)
2112         * crypto.c (_hx509_private_key_assign_key_file): ask for password
2113         if nothing matches.
2115         * cert.c: Expose more of the hx509_query interface.
2117         * collector.c: hx509_certs_find is now exposed.
2119         * cms.c: hx509_certs_find is now exposed.
2121         * revoke.c: hx509_certs_find is now exposed.
2123         * keyset.c (hx509_certs_free): allow free-ing NULL
2124         (hx509_certs_find): expose
2125         (hx509_get_one_cert): new function
2127         * hxtool.c: hx509_certs_find is now exposed.
2129         * hx_locl.h: Remove hx509_query, its exposed now.
2131         * hx509.h: Add hx509_query.
2132         
2133 2006-02-22  Love Hörnquist Åstrand  <lha@it.su.se>
2135         * cert.c: Add exceptions for null (empty) subjectNames
2137         * data/nist-data: Add some more name constraints tests.
2139         * data/nist-data: Add some of the test from 4.13 Name Constraints.
2141         * cert.c: Name constraits needs to be evaluated in block as they
2142         appear in the certificates, they can not be joined to one
2143         list. One example of this is:
2144         
2145         - cert is cn=foo,dc=bar,dc=baz
2146         - subca is dc=foo,dc=baz with name restriction dc=kaka,dc=baz
2147         - ca is dc=baz with name restriction dc=baz
2148         
2149         If the name restrictions are merged to a list, the certificate
2150         will pass this test.
2152 2006-02-14 Love Hörnquist Åstrand <lha@it.su.se>
2154         * cert.c: Handle more name constraints cases.
2156         * crypto.c (dsa_verify_signature): if test if malloc failed
2158 2006-01-31  Love Hörnquist Åstrand  <lha@it.su.se>
2160         * cms.c: Drop partial pkcs12 string2key implementation.
2161         
2162 2006-01-20  Love Hörnquist Åstrand  <lha@it.su.se>
2164         * data/nist-data: Add commited out DSA tests (they fail).
2166         * data/nist-data: Add 4.2 Validity Periods.
2168         * test_nist.in: Make less verbose to use.
2170         * Makefile.am: Add test_nist_cert.
2172         * data/nist-data: Add some more CRL-tests.
2174         * test_nist.in: Print $id instead of . when running the tests.
2176         * test_nist.in: Drop verifying certifiates, its done in another
2177         test now.
2179         * data/nist-data: fixup kill-rectangle leftovers
2181         * data/nist-data: Drop verifying certifiates, its done in another
2182         test now.  Add more crl tests. comment out all unused tests.
2184         * test_nist_cert.in: test parse all nist certs
2185         
2186 2006-01-19  Love Hörnquist Åstrand  <lha@it.su.se>
2188         * hx509_err.et: Add HX509_CRL_UNKNOWN_EXTENSION.
2190         * revoke.c: Check for unknown extentions in CRLs and CRLEntries.
2192         * test_nist.in: Parse new format to handle CRL info.
2194         * test_chain.in: Add --missing-crl.
2196         * name.c (hx509_unparse_der_name): Rename from hx509_parse_name.
2197         (_hx509_unparse_Name): Add.
2199         * hxtool-commands.in: Add --missing-crl to verify commands.
2201         * hx509_err.et: Add CRL errors.
2203         * cert.c (hx509_context_set_missing_crl): new function Add CRL
2204         handling.
2206         * hx_locl.h: Add HX509_CTX_CRL_MISSING_OK.
2208         * revoke.c: Parse and verify CRLs (simplistic).
2210         * hxtool.c: Parse CRL info.
2212         * data/nist-data: Change format so we can deal with CRLs, also
2213         note the test-id from PKITS.
2215         * data: regenerate test
2216         
2217         * data/gen-req.sh: use static-file to generate tests
2218         
2219         * data/static-file: new file to use for commited tests
2221         * test_cms.in: Use static file, add --missing-crl.
2222         
2223 2006-01-18  Love Hörnquist Åstrand <lha@it.su.se>
2225         * print.c: Its cRLReason, not cRLReasons.
2227         * hxtool.c: Attach revoke context to verify context.
2229         * data/nist-data: change syntax to make match better with crl
2230         checks
2232         * cert.c: Verify no certificates has been revoked with the new
2233         revoke interface.
2235         * Makefile.am: libhx509_la_SOURCES += revoke.c
2237         * revoke.c: Add framework for handling CRLs.
2239         * hx509.h: Add hx509_revoke_ctx.
2240         
2241 2006-01-13  Love Hörnquist Åstrand  <lha@it.su.se>
2243         * delete crypto_headers.h, use global file instead.
2245         * crypto.c (PBE_string2key): libdes now supports PKCS12_key_gen
2246         
2247 2006-01-12  Love Hörnquist Åstrand  <lha@it.su.se>
2249         * crypto_headers.h: Need BN_is_negative too.
2250         
2251 2006-01-11  Love Hörnquist Åstrand  <lha@it.su.se>
2252         
2253         * ks_p11.c (p11_rsa_public_decrypt): since is wrong, don't provide
2254         it. PKCS11 can't do public_decrypt, it support verify though. All
2255         this doesn't matter, since the code never go though this path.
2257         * crypto_headers.h: Provide glue to compile with less warnings
2258         with OpenSSL
2259         
2260 2006-01-08  Love Hörnquist Åstrand  <lha@it.su.se>
2261         
2262         * Makefile.am: Depend on LIB_des
2264         * lock.c: Use "crypto_headers.h".
2266         * crypto_headers.h: Include the two diffrent implementation of
2267         crypto headers.
2269         * cert.c: Use "crypto-headers.h". Load ENGINE configuration.
2271         * crypto.c: Make compile with both OpenSSL and heimdal libdes.
2273         * ks_p11.c: Add code for public key decryption (not supported yet)
2274         and use "crypto-headers.h".
2275         
2277 2006-01-04 Love Hörnquist Åstrand <lha@it.su.se>
2278         
2279         * add a hx509_context where we can store configuration
2281         * p11.c,Makefile.am: pkcs11 is now supported by library, remove
2282         old files.
2284         * ks_p11.c: more paranoid on refcount, set refcounter ealier,
2285         reset pointers after free
2287         * collector.c (struct private_key): remove temporary key data
2288         storage, convert directly to a key
2289         (match_localkeyid): match certificate and key using localkeyid
2290         (match_keys): match certificate and key using _hx509_match_keys
2291         (_hx509_collector_collect): rewrite to use match_keys and
2292         match_localkeyid
2294         * crypto.c (_hx509_match_keys): function that determins if a
2295         private key matches a certificate, used when there is no
2296         localkeyid.
2297         (*) reset free pointer
2299         * ks_file.c: Rewrite to use collector and mapping support
2300         function.
2302         * ks_p11.c (rsa_pkcs1_method): constify
2304         * ks_p11.c: drop extra wrapping of p11_init
2306         * crypto.c (_hx509_private_key_assign_key_file): use function to
2307         extact rsa key
2309         * cert.c: Revert previous, refcounter is unsigned, so it can never
2310         be negative.
2312         * cert.c (hx509_cert_ref): more refcount paranoia
2314         * ks_p11.c: Implement rsa_private_decrypt and add stubs for public
2315         ditto.
2317         * ks_p11.c: Less printf, less memory leaks.
2319         * ks_p11.c: Implement signing using pkcs11.
2320         
2321         * ks_p11.c: Partly assign private key, enough to complete
2322         collection, but not any crypto functionallity.
2324         * collector.c: Use hx509_private_key to assign private keys.
2326         * crypto.c: Remove most of the EVP_PKEY code, and use RSA
2327         directly, this temporary removes DSA support.
2329         * hxtool.c (print_f): print if there is a friendly name and if
2330         there is a private key
2331         
2332 2006-01-03  Love Hörnquist Åstrand  <lha@it.su.se>
2334         * name.c: Avoid warning from missing __attribute__((noreturn))
2336         * lock.c (_hx509_lock_unlock_certs): return unlock certificates
2338         * crypto.c (_hx509_private_key_assign_ptr): new function, exposes
2339         EVP_PKEY
2340         (_hx509_private_key_assign_key_file): remember to free private key
2341         if there is one.
2343         * cert.c (_hx509_abort): add newline to output and flush stdout
2345         * Makefile.am: libhx509_la_SOURCES += collector.c
2347         * hx_locl.h: forward type declaration of struct hx509_collector.
2349         * collector.c: Support functions to collect certificates and
2350         private keys and then match them.
2352         * ks_p12.c: Use the new hx509_collector support functions.
2354         * ks_p11.c: Add enough glue to support certificate iteration.
2356         * test_nist_pkcs12.in: Less verbose.
2358         * cert.c (hx509_cert_free): if there is a private key assosited
2359         with this cert, free it
2361         * print.c: Use _hx509_abort.
2363         * ks_p12.c: Use _hx509_abort.
2365         * hxtool.c: Use _hx509_abort.
2367         * crypto.c: Use _hx509_abort.
2369         * cms.c: Use _hx509_abort.
2371         * cert.c: Use _hx509_abort.
2373         * name.c: use _hx509_abort
2374         
2375 2006-01-02  Love Hörnquist Åstrand  <lha@it.su.se>
2377         * name.c (hx509_name_to_string): don't cut bmpString in half.
2379         * name.c (hx509_name_to_string): don't overwrite with 1 byte with
2380         bmpString.
2382         * ks_file.c (parse_certificate): avoid stomping before array
2384         * name.c (oidtostring): avoid leaking memory
2386         * keyset.c: Add _hx509_ks_dir_register.
2388         * Makefile.am (libhx509_la_SOURCES): += ks_dir.c
2390         * hxtool-commands.in: Remove pkcs11.
2392         * hxtool.c: Remove pcert_pkcs11.
2394         * ks_file.c: Factor out certificate parsing code.
2396         * ks_dir.c: Add new keystore that treats all files in a directory
2397         a keystore, useful for regression tests.
2398         
2399 2005-12-12  Love Hörnquist Åstrand  <lha@it.su.se>
2401         * test_nist_pkcs12.in: Test parse PKCS12 files from NIST.
2403         * data/nist-data: Can handle DSA certificate.
2404         
2405         * hxtool.c: Print error code on failure.
2406         
2407 2005-10-29  Love Hörnquist Åstrand  <lha@it.su.se>
2409         * crypto.c: Support DSA signature operations.
2410         
2411 2005-10-04  Love Hörnquist Åstrand  <lha@it.su.se>
2413         * print.c: Validate that issuerAltName and subjectAltName isn't
2414         empty.
2415         
2416 2005-09-14  Love Hörnquist Åstrand  <lha@it.su.se>
2418         * p11.c: Cast to unsigned char to avoid warning.
2420         * keyset.c: Register pkcs11 module.
2422         * Makefile.am: Add ks_p11.c, install hxtool.
2423         
2424         * ks_p11.c: Starting point of a pkcs11 module.
2425         
2426 2005-09-04  Love Hörnquist Åstrand  <lha@it.su.se>
2428         * lock.c: Implement prompter.
2430         * hxtool-commands.in: add --content to print
2432         * hxtool.c: Split verify and print.
2434         * cms.c: _hx509_pbe_decrypt now takes a hx509_lock.
2436         * crypto.c: Make _hx509_pbe_decrypt take a hx509_lock, workaround
2437         for empty password.
2439         * name.c: Add DC, handle all Directory strings, fix signless
2440         problems.
2441         
2442 2005-09-03  Love Hörnquist Åstrand  <lha@it.su.se>
2444         * test_query.in: Pass in --pass to all commands.
2446         * hxtool.c: Use option --pass.
2448         * hxtool-commands.in: Add --pass to all commands.
2450         * hx509_err.et: add UNKNOWN_LOCK_COMMAND and CRYPTO_NO_PROMPTER
2452         * test_cms.in: pass in password to cms-create-sd
2454         * crypto.c: Abstract out PBE_string2key so I can add PBE2 s2k
2455         later.  Avoid signess warnings with OpenSSL.
2457         * cms.c: Use void * instead of char * for to avoid signedness
2458         issues
2460         * cert.c (hx509_cert_get_attribute): remove const, its not
2462         * ks_p12.c: Cast size_t to unsigned long when print.
2464         * name.c: Fix signedness warning.
2466         * test_query.in: Use echo, the function check isn't defined here.
2467         
2468 2005-08-11  Love Hörnquist Åstrand  <lha@it.su.se>
2470         * hxtool-commands.in: Add more options that was missing.
2472 2005-07-28  Love Hörnquist Åstrand  <lha@it.su.se>
2474         * test_cms.in: Use --certificate= for enveloped/unenvelope.
2476         * hxtool.c: Use --certificate= for enveloped/unenvelope.  Clean
2477         up.
2479         * test_cms.in: add EnvelopeData tests
2480         
2481         * hxtool.c: use id-envelopedData for ContentInfo
2482         
2483         * hxtool-commands.in: add contentinfo wrapping for create/unwrap
2484         enveloped data
2486         * hxtool.c: add contentinfo wrapping for create/unwrap enveloped
2487         data
2489         * data/gen-req.sh: add enveloped data (aes128)
2490         
2491         * crypto.c: add "new" RC2 oid
2492         
2493 2005-07-27  Love Hörnquist Åstrand  <lha@it.su.se>
2495         * hx_locl.h, cert.c: Add HX509_QUERY_MATCH_FUNCTION that allows
2496         caller to match by function, note that this doesn't not work
2497         directly for backends that implements ->query, they must do their
2498         own processing. (I'm running out of flags, only 12 left now)
2500         * test_cms.in: verify ContentInfo wrapping code in hxtool
2501         
2502         * hxtool-commands.in (cms_create_sd): support wrapping in content
2503         info spelling
2505         * hxtool.c (cms_create_sd): support wrapping in content info
2507         * test_cms.in: test more cms signeddata messages
2508         
2509         * data/gen-req.sh: generate SignedData
2510         
2511         * hxtool.c (cms_create_sd): support certificate store, add support
2512         to unwrap a ContentInfo the SignedData inside.
2514         * crypto.c: sprinkel rk_UNCONST
2516         * crypto.c: add DER NULL to the digest oid's
2518         * hxtool-commands.in: add --content-info to cms-verify-sd
2520         * cms.c (hx509_cms_create_signed_1): pass in a full
2521         AlgorithmIdentifier instead of heim_oid for digest_alg
2523         * crypto.c: make digest_alg a digest_oid, it's not needed right
2524         now
2526         * hx509_err.et: add CERT_NOT_FOUND
2527         
2528         * keyset.c (_hx509_certs_find): add error code for cert not
2529         found
2531         * cms.c (hx509_cms_verify_signed): add external store of
2532         certificates, use the right digest algorithm identifier.
2534         * cert.c: fix const warning
2536         * ks_p12.c: slightly less verbose
2537         
2538         * cert.c: add hx509_cert_find_subjectAltName_otherName, add
2539         HX509_QUERY_MATCH_FRIENDLY_NAME
2540         
2541         * hx509.h: add hx509_octet_string_list, remove bad comment
2542         
2543         * hx_locl.h: add HX509_QUERY_MATCH_FRIENDLY_NAME
2545         * keyset.c (hx509_certs_append): needs a hx509_lock, add one
2547         * Makefile.am: add test cases tempfiles to CLEANFILES
2548         
2549         * Makefile.am: add test_query to TESTS, fix dependency on hxtool
2550         sources on hxtool-commands.h
2552         * hxtool-commands.in: explain what signer is for create-sd
2554         * hxtool.c: add query, add more options to verify-sd and create-sd
2556         * test_cms.in: add more cms tests
2557         
2558         * hxtool-commands.in: add query, add more options to verify-sd
2560         * test_query.in: test query interface
2561         
2562         * data: fix filenames for ds/ke files, add pkcs12 files, regen
2563         
2564         * hxtool.c,Makefile.am,hxtool-commands.in: switch to slc
2566 2005-07-26  Love Hörnquist Åstrand  <lha@it.su.se>
2568         * cert.c (hx509_verify_destroy_ctx): add
2569         
2570         * hxtool.c: free hx509_verify_ctx
2571         
2572         * name.c (_hx509_name_ds_cmp): make sure all strings are not equal
2574 2005-07-25  Love Hörnquist Åstrand  <lha@it.su.se>
2576         * hxtool.c: return error
2577         
2578         * keyset.c: return errors from iterations
2579         
2580         * test_chain.in: clean up checks
2581         
2582         * ks_file.c (parse_certificate): return errno's not 1 in case of
2583         error
2584         
2585         * ks_file.c (file_iter): make sure endpointer is NULL
2587         * ks_mem.c (mem_iter): follow conversion and return NULL when we
2588         get to the end, not ENOENT.
2589         
2590         * Makefile.am: test_chain depends on hxtool
2591         
2592         * data: test certs that lasts 10 years
2593         
2594         * data/gen-req.sh: script to generate test certs
2595         
2596         * Makefile.am: Add regression tests.
2598         * data: test certificate and keys
2600         * test_chain.in: test chain
2602         * hxtool.c (cms_create_sd): add KU digitalSigature as a
2603         requirement to the query
2605         * hx_locl.h: add KeyUsage query bits
2607         * hx509_err.et: add KeyUsage error
2609         * cms.c: add checks for KeyUsage
2611         * cert.c: more checks on KeyUsage, allow to query on them too
2613 2005-07-24  Love Hörnquist Åstrand  <lha@it.su.se>
2615         * cms.c: Add missing break.
2616         
2617         * hx_locl.h,cms.c,cert.c: allow matching on SubjectKeyId
2619         * hxtool.c: Use _hx509_map_file, _hx509_unmap_file and
2620         _hx509_write_file.
2622         * file.c (_hx509_write_file): in case of write error, return errno
2624         * file.c (_hx509_write_file): add a function that write a data
2625         blob to disk too
2627         * Fix id-tags
2629         * Import mostly complete X.509 and CMS library. Handles, PEM, DER,
2630         PKCS12 encoded certicates.  Verificate RSA chains and handled
2631         CMS's SignedData, and EnvelopedData.