*** empty log message ***
[heimdal.git] / lib / hx509 / ChangeLog
blob1378494b4104a8b69bf9c645491a09e8cc7fc7a0
1 2007-12-08  Love Hörnquist Åstrand  <lha@it.su.se>
3         * name.c: spelling.
5         * cert.c: make work the doxygen.
7         * name.c: fix doxygen compiling.
9         * Makefile.am: add doxygen.c
11         * doxygen.c: Add doxygen main page.
13         * cert.c: Add doxygen.
15         * revoke.c (_hx509_revoke_ref): new function.
17 2007-11-16  Love Hörnquist Åstrand  <lha@it.su.se>
19         * ks_keychain.c: Check if SecKeyGetCSPHandle needs prototype.
21 2007-08-16  Love Hörnquist Åstrand  <lha@it.su.se>
22         
23         * data/nist-data: Make work on case senstive filesystems too.
24         
25 2007-08-09  Love Hörnquist Åstrand  <lha@it.su.se>
27         * cert.c: match rfc822 contrains better, provide better error
28         strings.
30 2007-08-08  Love Hörnquist Åstrand  <lha@it.su.se>
32         * cert.c: "self-signed doesn't count" doesn't apply to trust
33         anchor certificate.  make trust anchor check consistant.
35         * revoke.c: make compile.
37         * revoke.c (verify_crl): set error strings.
38         
39         * revoke.c (verify_crl): handle with the signer is the
40         CRLsigner (shortcut).
42         * cert.c: Fix NC, comment on how to use _hx509_check_key_usage.
44 2007-08-03  Love Hörnquist Åstrand  <lha@it.su.se>
46         * test_nist2.in, Makefile, test/nist*: Add nist pkits tests. 
48         * revoke.c: Update to use CERT_REVOKED error, shortcut out of OCSP
49         checking when OCSP reply is a revocation reply.
51         * hx509_err.et: Make CERT_REVOKED error OCSP/CRL agnostic.
53         * name.c (_hx509_Name_to_string): make printableString handle
54         space (0x20) diffrences as required by rfc3280.
56         * revoke.c: Search for the right issuer when looking for the
57         issuer of the CRL signer.
59 2007-08-02  Love Hörnquist Åstrand  <lha@it.su.se>
61         * revoke.c: Handle CRL signing certificate better, try to not
62         revalidate invalid CRLs over and over.
64 2007-08-01  Love Hörnquist Åstrand  <lha@it.su.se>
66         * cms.c: remove stale comment.
68         * test_nist.in: Unpack PKITS_data.zip and run tests.
69         
70         * test_nist_cert.in: Adapt to new nist pkits framework.
72         * test_nist_pkcs12.in: Adapt to new nist pkits framework.
74         * Makefile.am: clean PKITS_data
76 2007-07-16  Love Hörnquist Åstrand  <lha@it.su.se>
78         * Makefile.am: Add version-script.map to EXTRA_DIST
80 2007-07-12  Love Hörnquist Åstrand  <lha@it.su.se>
82         * Makefile.am: Add depenency on asn1_compile for asn1 built files.
83         
84 2007-07-10  Love Hörnquist Åstrand  <lha@it.su.se>
86         * peer.c: update (c), indent.
88         * Makefile.am: New library version.
90 2007-06-28  Love Hörnquist Åstrand  <lha@it.su.se>
92         * ks_p11.c: Add sha2 types.
94         * ref/pkcs11.h: Sync with scute.
96         * ref/pkcs11.h: Add sha2 CKM's.
98         * print.c: Print authorityInfoAccess.
100         * cert.c: Rename proxyCertInfo oid.
102         * ca.c: Rename proxyCertInfo oid.
104         * print.c: Rename proxyCertInfo oid.
105         
106 2007-06-26  Love Hörnquist Åstrand  <lha@it.su.se>
108         * test_ca.in: Adapt to new request handling.
110         * req.c: Allow export some of the request parameters.
112         * hxtool-commands.in: Adapt to new request handling.
114         * hxtool.c: Adapt to new request handling.
116         * test_req.in: Adapt to new request handling.
118         * version-script.map: Add initialize_hx_error_table_r.
120         * req.c: Move _hx509_request_print here.
122         * hxtool.c: use _hx509_request_print
124         * version-script.map: Export more crap^W semiprivate functions.
126         * hxtool.c: don't _hx509_abort
128         * version-script.map: add missing ;
130 2007-06-25  Love Hörnquist Åstrand  <lha@it.su.se>
132         * cms.c: Use hx509_crypto_random_iv.
134         * crypto.c: Split out the iv creation from hx509_crypto_encrypt
135         since _hx509_pbe_encrypt needs to use the iv from the s2k
136         function.
138         * test_cert.in: Test PEM and DER FILE writing functionallity.
140         * ks_file.c: Add writing DER certificates.
142         * hxtool.c: Update to new hx509_pem_write().
144         * test_cms.in: test creation of PEM signeddata.
146         * hx509.h: PEM struct/function declarations.
148         * ks_file.c: Use PEM encoding/decoding functions.
150         * file.c: PEM encode/decoding functions.
152         * ks_file.c: Use hx509_pem_write.
154         * version-script.map: Export some semi-private functions.
156         * hxtool.c: Enable writing out signed data as a pem attachment.
158         * hxtool-commands.in (cms-create-signed): add --pem
160         * file.c (hx509_pem_write): Add.
162         * test_ca.in: Issue and test null subject cert.
164         * cert.c: Match is first component is in a CN=.
166         * test_ca.in: Test hostname if first CN.
168         * Makefile.am: Add version script.
170         * version-script.map: Limited exported symbols.
172         * test_ca.in: test --hostname.
174         * test_chain.in: test max-depth
176         * hx509.h: fixate HX509_HN_HOSTNAME at 0.
178         * hxtool-commands.in: add --hostname add --max-depth
180         * cert.c: Verify hostname and max-depth.
182         * hxtool.c: Verify hostname and test max-depth.
184 2007-06-24  Love Hörnquist Åstrand  <lha@it.su.se>
186         * test_cms.in: Test --id-by-name.
188         * hxtool-commands.in: add cms-create-sd --id-by-name
190         * hxtool.c: Use HX509_CMS_SIGATURE_ID_NAME.
192         * cms.c: Implement and use HX509_CMS_SIGATURE_ID_NAME.
194         * hx509.h: Add HX509_CMS_SIGATURE_ID_NAME, use subject name for
195         CMS.Identifier.  hx509_hostname_type: add hostname type for
196         matching.
198         * cert.c (match_general_name): more strict rfc822Name matching.
199         (hx509_verify_hostname): add hostname type for matching.
201 2007-06-19  Love Hörnquist Åstrand  <lha@it.su.se>
203         * hxtool.c: Make compile again.
205         * hxtool.c: Added peap-server for to make windows peap clients
206         happy.
208         * hxtool.c: Unify parse_oid code.
210         * hxtool.c: Implement --content-type.
212         * hxtool-commands.in: Add content-type.
214         * test_cert.in: more cert and keyset tests.
216 2007-06-18  Love Hörnquist Åstrand  <lha@it.su.se>
218         * revoke.c: Avoid stomping on NULL.
220         * revoke.c: Avoid reusing i.
222         * cert.c: Provide __attribute__ for _hx509_abort.
224         * ks_file.c: Fail if not finding iv.
226         * keyset.c: Avoid useing freed memory.
228         * crypto.c: Free memory in failure case.
230         * crypto.c: Free memory in failure case.
232 2007-06-12  Love Hörnquist Åstrand  <lha@it.su.se>
234         * *.c: Add hx509_cert_init_data and use everywhere
236         * hx_locl.h: Now that KEYCHAIN:system-anchors is fast again, use
237         that.
239         * ks_keychain.c: Implement trust anchor support with
240         SecTrustCopyAnchorCertificates.
242         * keyset.c: Set ref to 1 for the new object.
244         * cert.c: Fix logic for allow_default_trust_anchors
246         * keyset.c: Add refcounting to keystores.
248         * cert.c: Change logic for default trust anchors, make it be
249         either default trust anchor, the user supplied, or non at all.
251 2007-06-08  Love Hörnquist Åstrand  <lha@it.su.se>
253         * Makefile.am: Add data/j.pem.
255         * Makefile.am: Add test_windows.in.
256         
257 2007-06-06  Love Hörnquist Åstrand  <lha@it.su.se>
259         * ks_keychain.c: rename functions, leaks less memory and more
260         paranoia.
262         * test_cms.in: Test cms peer-alg.
264         * crypto.c (rsa_create_signature): make oid_id_pkcs1_rsaEncryption
265         mean rsa-with-sha1 but oid oid_id_pkcs1_rsaEncryption in algorithm
266         field.  XXX should probably use another algorithmIdentifier for
267         this.
269         * peer.c: Make free function return void.
271         * cms.c (hx509_cms_create_signed_1): Use hx509_peer_info to select
272         the signature algorithm too.
274         * hxtool-commands.in: Add cms-create-sd --peer-alg.
276         * req.c: Use _hx509_crypto_default_sig_alg.
278         * test_windows.in: Create crl, because everyone needs one.
280         * Makefile.am: add wcrl.crl
281         
282 2007-06-05  Love Hörnquist Åstrand  <lha@it.su.se>
284         * hx_locl.h: Disable KEYCHAIN for now, its slow.
286         * cms.c: When we are not using pkcs7-data, avoid seing
287         signedAttributes since some clients get upset by that (pkcs7 based
288         or just plain broken).
290         * ks_keychain.c: Provide rsa signatures.
292         * ks_keychain.c: Limit the searches to the selected keychain.
294         * ks_keychain.c: include -framework Security specific header files
295         after #ifdef
297         * ks_keychain.c: Find and attach private key (does not provide
298         operations yet though).
300         * ks_p11.c: Prefix rsa method with p11_
302         * ks_keychain.c: Allow opening a specific chain, making "system"
303         special and be the system X509Anchors file. By not specifing any
304         keychain ("KEYCHAIN:"), all keychains are probed.
305         
306 2007-06-04  Love Hörnquist Åstrand  <lha@it.su.se>
308         * hxtool.c (verify): Friendlier error message.
310         * cert.c: Read in and use default trust anchors if they exists.
312         * hx_locl.h: Add concept of default_trust_anchors.
314         * ks_keychain.c: Remove err(), remove extra empty comment, fix
315         _iter function.
317         * error.c (hx509_get_error_string): if the error code is not the
318         one we expect, punt and use the default com_err/strerror string
319         instead.
321         * keyset.c (hx509_certs_merge): its ok to merge in the NULL set of
322         certs.
324         * test_windows.in: Fix status string.
326         * ks_p12.c (store_func): free whole CertBag, not just the data
327         part.
328         
329         * print.c: Check that the self-signed cert is really self-signed.
331         * print.c: Use selfsigned for CRL DP whine, tell if its a
332         self-signed.
334         * print.c: Whine if its a non CA/proxy and doesn't have CRL DP.
336         * ca.c: Add cRLSign to CA certs.
338         * cert.c: Register NULL and KEYCHAIN.
340         * ks_null.c: register the NULL keystore.
342         * Makefile.am: Add ks_keychain.c and related libs.
344         * test_crypto.in: Print certificate with utf8.
346         * print.c: Leak less memory.
348         * hxtool.c: Leak less memory.
350         * print.c: Leak less memory, use functions that does same but
351         more.
353         * name.c (quote_string): don't sign extend the (signed) char to
354         avoid printing too much, add an assert to check that we didn't
355         overrun the buffer.
357         * name.c: Use right element out of the CHOICE for printableString
358         and utf8String
360         * ks_keychain.c: Certificate only KeyChain backend.
362         * name.c: Reset name before parsing it.
363         
364 2007-06-03  Love Hörnquist Åstrand  <lha@it.su.se>
365         
366         * revoke.c (hx509_crl_*): fix sizeof() mistakes to fix memory
367         corruption.
369         * hxtool.c: Add lifetime to crls.
371         * hxtool-commands.in: Add lifetime to crls.
373         * revoke.c: Add lifetime to crls.
375         * test_ca.in: More crl checks.
377         * revoke.c: Add revoking certs.
379         * hxtool-commands.in: argument is certificates.. for crl-sign
381         * hxtool.c (certificate_copy): free lock
383         * revoke.c: Fix hx509_set_error_string calls, add
384         hx509_crl_add_revoked_certs(), implement hx509_crl_{alloc,free}.
386         * hxtool.c (crl_sign): free lock
388         * cert.c (hx509_context_free): free querystat
389         
390 2007-06-02  Love Hörnquist Åstrand  <lha@it.su.se>
392         * test_chain.in: test ocsp-verify
393         
394         * revoke.c (hx509_ocsp_verify): explain what its useful for and
395         provide sane error message.
397         * hx509_err.et: New error code, CERT_NOT_IN_OCSP
399         * hxtool.c: New command ocsp-verify, check if ocsp contains all
400         certs and are valid (exist and non expired).
402         * hxtool-commands.in: New command ocsp-verify.
403         
404 2007-06-01  Love Hörnquist Åstrand  <lha@it.su.se>
406         * test_ca.in: Create crl and verify that is works.
408         * hxtool.c: Sign CRL command.
410         * hx509.h: Add hx509_crl.
412         * hxtool-commands.in: Add crl-sign commands.
414         * revoke.c: Support to generate an empty CRL.
416         * tst-crypto-select2: Switched default types.
418         * tst-crypto-select1: Switched default types.
420         * ca.c: Use default AlgorithmIdentifier.
422         * cms.c: Use default AlgorithmIdentifier.
424         * crypto.c: Provide default AlgorithmIdentifier and use them.
426         * hx_locl.h: Provide default AlgorithmIdentifier.
428         * keyset.c (hx509_certs_find): collects stats for queries.
430         * cert.c: Sort and print more info.
432         * hx_locl.h: Add querystat to hx509_context.
434         * test_*.in: sprinle stat saveing
436         * Makefile.am: Add stat and objdir.
438         * collector.c (_hx509_collector_alloc): return error code instead
439         of pointer.
441         * hxtool.c: Add statistic hook.
443         * ks_file.c: Update _hx509_collector_alloc prototype.
445         * ks_p12.c: Update _hx509_collector_alloc prototype.
447         * ks_p11.c: Update _hx509_collector_alloc prototype.
449         * hxtool-commands.in: Add statistics hook.
451         * cert.c: Statistics printing.
453         * ks_p12.c: plug memory leak
455         * ca.c (hx509_ca_tbs_add_crl_dp_uri): plug memory leak
456         
457 2007-05-31  Love Hörnquist Åstrand  <lha@it.su.se>
459         * print.c: print utf8 type SAN's
461         * Makefile.am: Fix windows client cert name.
463         * test_windows.in: Add crl-uri for the ee certs.
465         * print.c: Printf formating.
467         * ca.c: Add glue for adding CRL dps.
469         * test_ca.in: Readd the crl adding code, it works (somewhat) now.
471         * print.c: Fix printing of CRL DPnames (I hate IMPLICIT encoded
472         structures).
474         * hxtool-commands.in: make ca and alias of certificate-sign
475         
476 2007-05-30  Love Hörnquist Åstrand  <lha@it.su.se>
478         * crypto.c (hx509_crypto_select): copy AI to the right place.
480         * hxtool-commands.in: Add ca --ms-upn.
482         * hxtool.c: add --ms-upn and add more EKU's for pk-init client.
484         * ca.c: Add hx509_ca_tbs_add_san_ms_upn and refactor code.
486         * test_crypto.in: Resurect killed e.
488         * test_crypto.in: check for aes256-cbc
490         * tst-crypto-select7: check for aes256-cbc
492         * test_windows.in: test windows stuff
494         * hxtool.c: add ca --domain-controller option, add secret key
495         option to avaible.
497         * ca.c: Add hx509_ca_tbs_set_domaincontroller.
499         * hxtool-commands.in: add ca --domain-controller
501         * hxtool.c: hook for testing secrety key algs
503         * crypto.c: Add selection code for secret key crypto.
505         * hx509.h: Add HX509_SELECT_SECRET_ENC.
506         
507 2007-05-13  Love Hörnquist Åstrand  <lha@it.su.se>
508         
509         * ks_p11.c: add more mechtypes
510         
511 2007-05-10  Love Hörnquist Åstrand  <lha@it.su.se>
512         
513         * print.c: Indent.
515         * hxtool-commands.in: add test-crypto command
517         * hxtool.c: test crypto command
519         * cms.c (hx509_cms_create_signed_1): if no eContentType is given,
520         use pkcs7-data.
522         * print.c: add Netscape cert comment
524         * crypto.c: Try both the empty password and the NULL
525         password (nothing vs the octet string \x00\x00).
527         * print.c: Add some US Fed PKI oids.
529         * ks_p11.c: Add some more hashes.
530         
531 2007-04-24  Love Hörnquist Åstrand  <lha@it.su.se>
533         * hxtool.c (crypto_select): stop memory leak
534         
535 2007-04-19  Love Hörnquist Åstrand  <lha@it.su.se>
537         * peer.c (hx509_peer_info_free): free memory used too
539         * hxtool.c (crypto_select): only free peer if it was used.
540         
541 2007-04-18  Love Hörnquist Åstrand  <lha@it.su.se>
543         * hxtool.c: free template
545         * ks_mem.c (mem_free): free key array too
547         * hxtool.c: free private key and tbs
549         * hxtool.c (hxtool_ca): free signer
551         * hxtool.c (crypto_available): free peer too.
553         * ca.c (get_AuthorityKeyIdentifier): leak less memory
555         * hxtool.c (hxtool_ca): free SPKI
557         * hxtool.c (hxtool_ca): free cert
559         * ks_mem.c (mem_getkeys): allocate one more the we have elements
560         so its possible to store the NULL pointer at the end.
561         
562 2007-04-16  Love Hörnquist Åstrand  <lha@it.su.se>
563         
564         * Makefile.am: CLEANFILES += cert-null.pem cert-sub-ca2.pem
565         
566 2007-02-05  Love Hörnquist Åstrand  <lha@it.su.se>
567         
568         * ca.c: Disable CRLDistributionPoints for now, its IMPLICIT code
569         in the asn1 parser.
571         * print.c: Add some more \n's.
572         
573 2007-02-03  Love Hörnquist Åstrand  <lha@it.su.se>
574         
575         * file.c: Allow mapping using heim_octet_string.
577         * hxtool.c: Add options to generate detached signatures.
579         * cms.c: Add flags to generate detached signatures.
581         * hx509.h: Flag to generate detached signatures.
583         * test_cms.in: Support detached sigatures.
585         * name.c (hx509_general_name_unparse): unparse the other
586         GeneralName nametypes.
588         * print.c: Use less printf. Use hx509_general_name_unparse.
590         * cert.c: Fix printing and plug leak-on-error.
591         
592 2007-01-31  Love Hörnquist Åstrand  <lha@it.su.se>
593         
594         * test_ca.in: Add test for ca --crl-uri.
596         * hxtool.c: Add ca --crl-uri.
598         * hxtool-commands.in: add ca --crl-uri
600         * ca.c: Code to set CRLDistributionPoints in certificates.
602         * print.c: Check CRLDistributionPointNames.
604         * name.c (hx509_general_name_unparse): function for unparsing
605         GeneralName, only supports GeneralName.URI
607         * cert.c (is_proxy_cert): free info if we wont return it.
608         
609 2007-01-30  Love Hörnquist Åstrand  <lha@it.su.se>
610         
611         * hxtool.c: Try to help how to use this command.
612         
613 2007-01-21  Love Hörnquist Åstrand  <lha@it.su.se>
614         
615         * switch to sha256 as default digest for signing
617 2007-01-20  Love Hörnquist Åstrand  <lha@it.su.se>
619         * test_ca.in: Really test sub-ca code, add basic constraints tests
620         
621 2007-01-17  Love Hörnquist Åstrand  <lha@it.su.se>
622         
623         * Makefile.am: Fix makefile problem.
624         
625 2007-01-16  Love Hörnquist Åstrand  <lha@it.su.se>
627         * hxtool.c: Set num of bits before we generate the key.
628         
629 2007-01-15  Love Hörnquist Åstrand  <lha@it.su.se>
630         
631         * cms.c (hx509_cms_create_signed_1): use hx509_cert_binary
633         * ks_p12.c (store_func): use hx509_cert_binary
635         * ks_file.c (store_func): use hx509_cert_binary
637         * cert.c (hx509_cert_binary): return binary encoded
638         certificate (DER format)
639         
640 2007-01-14  Love Hörnquist Åstrand  <lha@it.su.se>
641         
642         * ca.c (hx509_ca_tbs_subject_expand): new function.
644         * name.c (hx509_name_expand): if env is NULL, return directly
646         * test_ca.in: test template handling
648         * hx509.h: Add template flags.
650         * Makefile.am: clean out new files
652         * hxtool.c: Add certificate template processing, fix hx509_err
653         usage.
655         * hxtool-commands.in: Add certificate template processing.
657         * ca.c: Add certificate template processing. Fix return messages
658         from hx509_ca_tbs_add_eku.
660         * cert.c: Export more stuff from certificate.
661         
662 2007-01-13  Love Hörnquist Åstrand  <lha@it.su.se>
664         * ca.c: update (c)
666         * ca.c: (hx509_ca_tbs_add_eku): filter out dups.
667         
668         * hxtool.c: Add type email and add email eku when using option
669         --email.
671         * Makefile.am: add env.c
673         * name.c: Remove abort, add error handling.
675         * test_name.c: test name expansion
677         * name.c: add hx509_name_expand
679         * env.c: key-value pair help functions
680         
681 2007-01-12  Love Hörnquist Åstrand  <lha@it.su.se>
682         
683         * ca.c: Don't issue certs with subject DN that is NULL and have no
684         SANs
686         * print.c: Fix previous test.
688         * print.c: Check there is a SAN if subject DN is NULL.
690         * test_ca.in: test email, null subject dn
692         * hxtool.c: Allow setting parameters to private key generation.
694         * hx_locl.h: Allow setting parameters to private key generation.
696         * crypto.c: Allow setting parameters to private key generation.
698         * hxtool.c (eval_types): add jid if user gave one
700         * hxtool-commands.in (certificate-sign): add --jid
702         * ca.c (hx509_ca_tbs_add_san_jid): Allow adding
703         id-pkix-on-xmppAddr OtherName.
705         * print.c: Print id-pkix-on-xmppAddr OtherName.
706         
707 2007-01-11  Love Hörnquist Åstrand  <lha@it.su.se>
708         
709         * no random, no RSA/DH tests
711         * hxtool.c (info): print status of random generator
713         * Makefile.am: remove files created by tests
715         * error.c: constify
717         * name.c: constify
719         * revoke.c: constify
721         * hx_locl.h: constify
723         * keyset.c: constify
725         * ks_p11.c: constify
727         * hx_locl.h: make printinfo char * argument const.
729         * cms.c: move _hx509_set_digest_alg from cms.c to crypto.c since
730         its only used there.
732         * crypto.c: remove no longer used stuff, move set_digest_alg here
733         from cms.c since its only used here.
735         * Makefile.am: add data/test-nopw.p12 to EXTRA_DIST
736         
737 2007-01-10  Love Hörnquist Åstrand  <lha@it.su.se>
738         
739         * print.c: BasicConstraints vs criticality bit is complicated and
740         not really possible to evaluate on its own, silly RFC3280.
742         * ca.c: Make basicConstraints critical if this is a CA.
744         * print.c: fix the version vs extension test
746         * print.c: More validation checks.
748         * name.c (hx509_name_cmp): add
749         
750 2007-01-09  Love Hörnquist Åstrand  <lha@it.su.se>
752         * ks_p11.c (collect_private_key): Missing CKA_MODULUS is ok
753         too (XXX why should these be fetched given they are not used).
755         * test_ca.in: rename all files to PEM files, since that is what
756         they are.
758         * hxtool.c: copy out the key with the self signed CA cert
760         * Factor out private key operation out of the signing, operations,
761         support import, export, and generation of private keys. Add
762         support for writing PEM and PKCS12 files with private keys in them.
764         * data/gen-req.sh: Generate a no password pkcs12 file.
765         
766 2007-01-08  Love Hörnquist Åstrand  <lha@it.su.se>
768         * cms.c: Check for internal ASN1 encoder error.
769         
770 2007-01-05  Love Hörnquist Åstrand  <lha@it.su.se>
771         
772         * Makefile.am: Drop most of the pkcs11 files.
774         * test_ca.in: test reissueing ca certificate (xxx time
775         validAfter).
777         * hxtool.c: Allow setting serialNumber (needed for reissuing
778         certificates) Change --key argument to --out-key.
780         * hxtool-commands.in (issue-certificate): Allow setting
781         serialNumber (needed for reissuing certificates), Change --key
782         argument to --out-key.
784         * ref: Replace with Marcus Brinkmann of g10 Code GmbH pkcs11
785         headerfile that is compatible with GPL (file taken from scute)
787 2007-01-04  Love Hörnquist Åstrand  <lha@it.su.se>
789         * test_ca.in: Test to generate key and use them.
791         * hxtool.c: handle other keys the pkcs10 requested keys
793         * hxtool-commands.in: add generate key commands
795         * req.c (_hx509_request_to_pkcs10): PKCS10 needs to have a subject
797         * hxtool-commands.in: Spelling.
799         * ca.c (hx509_ca_tbs_set_proxy): allow negative pathLenConstraint
800         to signal no limit
802         * ks_file.c: Try all formats on the binary file before giving up,
803         this way we can handle binary rsa keys too.
805         * data/key2.der: new test key
807 2007-01-04  David Love  <fx@gnu.org>
809         * Makefile.am (hxtool_LDADD): Add libasn1.la
811         * hxtool.c (pcert_verify): Fix format string.
813 2006-12-31  Love Hörnquist Åstrand  <lha@it.su.se>
815         * hxtool.c: Allow setting path length
817         * cert.c: Fix test for proxy certs chain length, it was too
818         restrictive.
819         
820         * data: regen
821         
822         * data/openssl.cnf: (proxy_cert) make length 0
824         * test_ca.in: Issue a long living cert.
826         * hxtool.c: add --lifetime to ca command.
828         * hxtool-commands.in: add --lifetime to ca command.
830         * ca.c: allow setting notBefore and notAfter.
832         * test_ca.in: Test generation of proxy certificates.
834         * ca.c: Allow generation of proxy certificates, always include
835         BasicConstraints, fix error codes.
837         * hxtool.c: Allow generation of proxy certificates.
839         * test_name.c: make hx509_parse_name take a hx509_context.
841         * name.c: Split building RDN to a separate function.
842         
843 2006-12-30  Love Hörnquist Åstrand  <lha@it.su.se>
844         
845         * Makefile.am: clean test_ca files.
847         * test_ca.in: test issuing self-signed and CA certificates.
849         * hxtool.c: Add bits to allow issuing self-signed and CA
850         certificates.
852         * hxtool-commands.in: Add bits to allow issuing self-signed and CA
853         certificates.
855         * ca.c: Add bits to allow issuing CA certificates.
857         * revoke.c: use new OCSPSigning.
859         * ca.c: Add Subject Key Identifier.
861         * ca.c: Add Authority Key Identifier.
862         
863         * cert.c: Locally export _hx509_find_extension_subject_key_id.
864         Handle AuthorityKeyIdentifier where only authorityCertSerialNumber
865         and authorityCertSerialNumber is set.
867         * hxtool-commands.in: Add dnsname and rfc822 SANs.
869         * test_ca.in: Test dnsname and rfc822 SANs.
871         * ca.c: Add dnsname and rfc822 SANs.
873         * hxtool.c: Add dnsname and rfc822 SANs.
875         * test_ca.in: test adding eku, ku and san to the
876         certificate (https and pk-init)
878         * hxtool.c: Add eku, ku and san to the certificate.
880         * ca.c: Add eku, ku and san to the certificate.
882         * hxtool-commands.in: Add --type and --pk-init-principal
884         * ocsp.asn1: remove id-kp-OCSPSigning, its in rfc2459.asn1 now
885         
886 2006-12-29  Love Hörnquist Åstrand  <lha@it.su.se>
888         * ca.c: Add KeyUsage extension.
890         * Makefile.am: add ca.c, add sign-certificate tests.
892         * crypto.c: Add _hx509_create_signature_bitstring.
894         * hxtool-commands.in: Add the sign-certificate tool.
896         * hxtool.c: Add the sign-certificate tool.
898         * cert.c: Add HX509_QUERY_OPTION_KU_KEYCERTSIGN.
900         * hx509.h: Add hx509_ca_tbs and HX509_QUERY_OPTION_KU_KEYCERTSIGN.
902         * test_ca.in: Basic test of generating a pkcs10 request, signing
903         it and verifying the chain.
905         * ca.c: Naive certificate signer.
906         
907 2006-12-28  Love Hörnquist Åstrand  <lha@it.su.se>
908         
909         * hxtool.c: add hxtool_hex
910         
911 2006-12-22  Love Hörnquist Åstrand  <lha@it.su.se>
912         
913         * Makefile.am: use top_builddir for libasn1.la
914         
915 2006-12-11  Love Hörnquist Åstrand  <lha@it.su.se>
916         
917         * hxtool.c (print_certificate): print serial number.
919         * name.c (no): add S=stateOrProvinceName
920         
921 2006-12-09  Love Hörnquist Åstrand  <lha@it.su.se>
922         
923         * crypto.c (_hx509_private_key_assign_rsa): set a default sig alg
925         * ks_file.c (try_decrypt): pass down AlgorithmIdentifier that key
926         uses to do sigatures so there is no need to hardcode RSA into this
927         function.
928         
929 2006-12-08  Love Hörnquist Åstrand  <lha@it.su.se>
931         * ks_file.c: Pass filename to the parse functions and use it in
932         the error messages
934         * test_chain.in: test proxy cert (third level)
935         
936         * hx509_err.et: fix errorstring for PROXY_CERT_NAME_WRONG
938         * data: regen
940         * Makefile.am: EXTRA_DIST: add
941         data/proxy10-child-child-test.{key,crt}
943         * data/gen-req.sh: Fix names and restrictions on the proxy
944         certificates
946         * cert.c: Clairfy and make proxy cert handling work for multiple
947         levels, before it was too restrictive. More helpful error message.
948         
949 2006-12-07  Love Hörnquist Åstrand  <lha@it.su.se>
950         
951         * cert.c (check_key_usage): tell what keyusages are missing
953         * print.c: Split OtherName printing code to a oid lookup and print
954         function.
956         * print.c (Time2string): print hour as hour not min
958         * Makefile.am: CLEANFILES += test
959         
960 2006-12-06  Love Hörnquist Åstrand  <lha@it.su.se>
962         * Makefile.am (EXTRA_DIST): add data/pkinit-proxy* files
964         * Makefile.am (EXTRA_DIST): add tst-crypto* files
966         * cert.c (hx509_query_match_issuer_serial): make a copy of the
967         data
969         * cert.c (hx509_query_match_issuer_serial): allow matching on
970         issuer and serial num
972         * cert.c (_hx509_calculate_path): add flag to allow leaving out
973         trust anchor
975         * cms.c (hx509_cms_create_signed_1): when building the path, omit
976         the trust anchors.
978         * crypto.c (rsa_create_signature): Abort when signature is longer,
979         not shorter.
981         * cms.c: Provide time to _hx509_calculate_path so we don't send no
982         longer valid certs to our peer.
984         * cert.c (find_parent): when checking for certs and its not a
985         trust anchor, require time be in range.
986         (_hx509_query_match_cert): Add time validity-testing to query mask
988         * hx_locl.h: add time validity-testing to query mask
990         * test_cms.in: Tests for CMS SignedData with incomplete chain from
991         the signer.
992         
993 2006-11-28  Love Hörnquist Åstrand  <lha@it.su.se>
995         * cms.c (hx509_cms_verify_signed): specify what signature we
996         failed to verify
997         
998         * Makefile.am: Depend on LIB_com_err for AIX.
1000         * keyset.c: Remove anther strndup that causes AIX to fall over.
1002         * cert.c: Don't check the trust anchors expiration time since they
1003         are transported out of band, from RFC3820.
1005         * cms.c: sprinkle more error strings
1007         * crypto.c: sprinkle more error strings
1009         * hxtool.c: use unsigned int as counter to fit better with the
1010         asn1 compiler
1012         * crypto.c: use unsigned int as counter to fit better with the
1013         asn1 compiler
1014         
1015 2006-11-27  Love Hörnquist Åstrand  <lha@it.su.se>
1016         
1017         * cms.c: Remove trailing white space.
1019         * crypto.c: rewrite comment to make more sense
1021         * crypto.c (hx509_crypto_select): check sig_algs[j]->key_oid
1023         * hxtool-commands.in (crypto-available): add --type
1025         * crypto.c (hx509_crypto_available): let alg pass if its keyless
1027         * hxtool-commands.in: Expand crypto-select
1029         * cms.c: Rename hx509_select to hx509_crypto_select.
1031         * hxtool-commands.in: Add crypto-select and crypto-available.
1033         * hxtool.c: Add crypto-select and crypto-available.
1035         * crypto.c (hx509_crypto_available): use right index.
1036         (hx509_crypto_free_algs): new function
1038         * crypto.c (hx509_crypto_select): improve
1039         (hx509_crypto_available): new function
1040         
1041 2006-11-26  Love Hörnquist Åstrand  <lha@it.su.se>
1042         
1043         * cert.c: Sprinkle more error string and hx509_contexts.
1045         * cms.c: Sprinkle more error strings.
1047         * crypto.c: Sprinkle error string and hx509_contexts.
1049         * crypto.c: Add some more comments about how this works.
1051         * crypto.c (hx509_select): new function.
1052         
1053         * Makefile.am: add peer.c
1055         * hxtool.c: Update hx509_cms_create_signed_1.
1057         * hx_locl.h: add struct hx509_peer_info
1059         * peer.c: Allow selection of digest/sig-alg
1061         * cms.c: Allow selection of a better digest using hx509_peer_info.
1063         * revoke.c: Handle that _hx509_verify_signature takes a context.
1064         
1065         * cert.c: Handle that _hx509_verify_signature takes a context.
1066         
1067 2006-11-25  Love Hörnquist Åstrand  <lha@it.su.se>
1069         * cms.c: Sprinkle error strings.
1071         * crypto.c: Sprinkle context and error strings.
1072         
1073 2006-11-24  Love Hörnquist Åstrand  <lha@it.su.se>
1075         * name.c: Handle printing and parsing raw oids in name.
1077 2006-11-23  Love Hörnquist Åstrand  <lha@it.su.se>
1079         * cert.c (_hx509_calculate_path): allow to calculate optimistic
1080         path when we don't know the trust anchors, just follow the chain
1081         upward until we no longer find a parent or we hit the max limit.
1083         * cms.c (hx509_cms_create_signed_1): provide a best effort path to
1084         the trust anchors to be stored in the SignedData packet, if find
1085         parents until trust anchor or max length.
1087         * data: regen
1089         * data/gen-req.sh: Build pk-init proxy cert.
1090         
1091 2006-11-16  Love Hörnquist Åstrand  <lha@it.su.se>
1092         
1093         * error.c (hx509_get_error_string): Put ", " between strings in
1094         error message.
1095         
1096 2006-11-13  Love Hörnquist Åstrand  <lha@it.su.se>
1098         * data/openssl.cnf: Change realm to TEST.H5L.SE
1099         
1100 2006-11-07  Love Hörnquist Åstrand  <lha@it.su.se>
1102         * revoke.c: Sprinkle error strings.
1103         
1104 2006-11-04  Love Hörnquist Åstrand  <lha@it.su.se>
1105         
1106         * hx_locl.h: add context variable to cmp function.
1108         * cert.c (hx509_query_match_cmp_func): allow setting the match
1109         function.
1110         
1111 2006-10-24  Love Hörnquist Åstrand  <lha@it.su.se>
1113         * ks_p11.c: Return less EINVAL.
1115         * hx509_err.et: add more pkcs11 errors
1117         * hx509_err.et: more error-codes
1119         * revoke.c: Return less EINVAL.
1121         * ks_dir.c: sprinkel more hx509_set_error_string
1123         * ks_file.c: Return less EINVAL.
1125         * hxtool.c: Pass in context to _hx509_parse_private_key.
1127         * ks_file.c: Sprinkle more hx509_context so we can return propper
1128         errors.
1130         * hx509_err.et: add HX509_PARSING_KEY_FAILED
1132         * crypto.c: Sprinkle more hx509_context so we can return propper
1133         errors.
1135         * collector.c: No more EINVAL.
1137         * hx509_err.et: add HX509_LOCAL_ATTRIBUTE_MISSING
1139         * cert.c (hx509_cert_get_base_subject): one less EINVAL
1140         (_hx509_cert_private_decrypt): one less EINVAL
1141         
1142 2006-10-22  Love Hörnquist Åstrand  <lha@it.su.se>
1144         * collector.c: indent
1146         * hxtool.c: Try to not leak memory.
1148         * req.c: clean memory before free
1150         * crypto.c (_hx509_private_key2SPKI): indent
1152         * req.c: Try to not leak memory.
1153         
1154 2006-10-21  Love Hörnquist Åstrand  <lha@it.su.se>
1156         * test_crypto.in: Read 50 kilobyte random data
1157         
1158         * revoke.c: Try to not leak memory.
1160         * hxtool.c: Try to not leak memory.
1162         * crypto.c (hx509_crypto_destroy): free oid.
1164         * error.c: Clean error string on failure just to make sure.
1166         * cms.c: Try to not leak memory (again).
1168         * hxtool.c: use a sensable content type
1170         * cms.c: Try harder to free certificate.
1171         
1172 2006-10-20  Love Hörnquist Åstrand  <lha@it.su.se>
1174         * Makefile.am: Add make check data.
1175         
1176 2006-10-19  Love Hörnquist Åstrand  <lha@it.su.se>
1177         
1178         * ks_p11.c (p11_list_keys): make element of search_data[0]
1179         constants and set them later
1181         * Makefile.am: Add more files.
1182         
1183 2006-10-17  Love Hörnquist Åstrand  <lha@it.su.se>
1184         
1185         * ks_file.c: set ret, remember to free ivdata
1186         
1187 2006-10-16  Love Hörnquist Åstrand  <lha@it.su.se>
1189         * hx_locl.h: Include <parse_bytes.h>.
1191         * test_crypto.in: Test random-data.
1193         * hxtool.c: RAND_bytes() return 1 for cryptographic strong data,
1194         check for that.
1196         * Makefile.am: clean random-data
1198         * hxtool.c: Add random-data command, use sl_slc_help.
1200         * hxtool-commands.in: Add random-data.
1202         * ks_p12.c: Remember to release certs.
1204         * ks_p11.c: Remember to release certs.
1205         
1206 2006-10-14  Love Hörnquist Åstrand  <lha@it.su.se>
1207         
1208         * prefix der primitives with der_
1210         * lock.c: Match the prompt type PROMPT exact.
1212         * hx_locl.h: Drop heim_any.h
1213         
1214 2006-10-11  Love Hörnquist Åstrand  <lha@it.su.se>
1215         
1216         * ks_p11.c (p11_release_module): j needs to be used as inter loop
1217         index. From Douglas Engert.
1219         * ks_file.c (parse_rsa_private_key): try all passwords and
1220         prompter.
1221         
1222 2006-10-10  Love Hörnquist Åstrand  <lha@it.su.se>
1223         
1224         * test_*.in: Parameterise the invocation of hxtool, so we can make
1225         it run under TESTS_ENVIRONMENT. From Andrew Bartlett
1227 2006-10-08  Love Hörnquist Åstrand  <lha@it.su.se>
1229         * test_crypto.in: Put all test stuck at 2006-09-25 since all their
1230         chains where valied then.
1232         * hxtool.c: Implement --time= option.
1234         * hxtool-commands.in: Add option time.
1236         * Makefile.am: test_name is a PROGRAM_TESTS
1238         * ks_p11.c: Return HX509_PKCS11_NO_SLOT when there are no slots
1239         and HX509_PKCS11_NO_TOKEN when there are no token. For use in PAM
1240         modules that want to detect when to use smartcard login and when
1241         not to. Patched based on code from Douglas Engert.
1243         * hx509_err.et: Add new pkcs11 related errors in a new section:
1244         keystore related error.  Patched based on code from Douglas
1245         Engert.
1246         
1247 2006-10-07  Love Hörnquist Åstrand  <lha@it.su.se>
1249         * Makefile.am: Make depenency for slc built files just like
1250         everywhere else.
1252         * cert.c: Add all openssl algs and init asn1 et
1253         
1254 2006-10-06  Love Hörnquist Åstrand  <lha@it.su.se>
1256         * ks_file.c (parse_rsa_private_key): free type earlier.
1258         * ks_file.c (parse_rsa_private_key): free type after use
1260         * name.c (_hx509_Name_to_string): remove dup const
1261         
1262 2006-10-02  Love Hörnquist Åstrand  <lha@it.su.se>
1263         
1264         * Makefile.am: Add more libs to libhx509
1265         
1266 2006-10-01  Love Hörnquist Åstrand  <lha@it.su.se>
1268         * ks_p11.c: Fix double free's, NULL ptr de-reference, and conform
1269         better to pkcs11.  From Douglas Engert.
1271         * ref: remove ^M, it breaks solaris 10s cc. From Harald Barth
1273 2006-09-19  Love Hörnquist Åstrand  <lha@it.su.se>
1275         * test_crypto.in: Bleichenbacher bad cert from Ralf-Philipp
1276         Weinmann and Andrew Pyshkin, pad right.
1278         * data: starfield test root cert and Ralf-Philipp and Andreis
1279         correctly padded bad cert
1281 2006-09-15  Love Hörnquist Åstrand  <lha@it.su.se>
1283         * test_crypto.in: Add test for yutaka certs.
1285         * cert.c: Add a strict rfc3280 verification flag. rfc3280 requires
1286         certificates to have KeyUsage.keyCertSign if they are to be used
1287         for signing of certificates, but the step in the verifiation is
1288         optional.
1290         * hxtool.c: Improve printing and error reporting.
1291         
1292 2006-09-13  Love Hörnquist Åstrand  <lha@it.su.se>
1294         * test_crypto.in,Makefile.am,data/bleichenbacher-{bad,good}.pem:
1295         test bleichenbacher from eay
1297 2006-09-12  Love Hörnquist Åstrand  <lha@it.su.se>
1299         * hxtool.c: Make common function for all getarg_strings and
1300         hx509_certs_append commonly used.
1302         * cms.c: HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT is a negative
1303         flag, treat it was such.
1304         
1305 2006-09-11  Love Hörnquist Åstrand  <lha@it.su.se>
1307         * req.c: Use the new add_GeneralNames function.
1309         * hx509.h: Add HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT.
1311         * ks_p12.c: Adapt to new signature of hx509_cms_unenvelope.
1313         * hxtool.c: Adapt to new signature of hx509_cms_unenvelope.
1315         * cms.c: Allow passing in encryptedContent and flag.  Add new flag
1316         HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT.
1317         
1318 2006-09-08  Love Hörnquist Åstrand  <lha@it.su.se>
1319         
1320         * ks_p11.c: cast void * to char * when using it for %s formating
1321         in printf.
1323         * name.c: New function _hx509_Name_to_string.
1324         
1325 2006-09-07  Love Hörnquist Åstrand  <lha@it.su.se>
1327         * ks_file.c: Sprinkle error messages.
1329         * cms.c: Sprinkle even more error messages.
1330         
1331         * cms.c: Sprinkle some error messages.
1333         * cms.c (find_CMSIdentifier): only free string when we allocated
1334         one.
1336         * ks_p11.c: Don't build most of the pkcs11 module if there are no
1337         dlopen().
1338         
1339 2006-09-06  Love Hörnquist Åstrand  <lha@it.su.se>
1341         * cms.c (hx509_cms_unenvelope): try to save the error string from
1342         find_CMSIdentifier so we have one more bit of information what
1343         went wrong.
1345         * hxtool.c: More pretty printing, make verify_signed return the
1346         error string from the library.
1348         * cms.c: Try returning what certificates failed to parse or be
1349         found.
1351         * ks_p11.c (p11_list_keys): fetch CKA_LABEL and use it to set the
1352         friendlyname for the certificate.
1353         
1354 2006-09-05  Love Hörnquist Åstrand  <lha@it.su.se>
1355         
1356         * crypto.c: check that there are no extra bytes in the checksum
1357         and that the parameters are NULL or the NULL-type. All to avoid
1358         having excess data that can be used to fake the signature.
1360         * hxtool.c: print keyusage
1362         * print.c: add hx509_cert_keyusage_print, simplify oid printing
1364         * cert.c: add _hx509_cert_get_keyusage
1366         * ks_p11.c: keep one session around for the whole life of the keyset
1368         * test_query.in: tests more selection
1370         * hxtool.c: improve pretty printing in print and query
1372         * hxtool{.c,-commands.in}: add selection on KU and printing to query
1374         * test_cms.in: Add cms test for digitalSignature and
1375         keyEncipherment certs.
1377         * name.c (no): Add serialNumber
1379         * ks_p11.c (p11_get_session): return better error messages
1380         
1381 2006-09-04  Love Hörnquist Åstrand  <lha@it.su.se>
1383         * ref: update to pkcs11 reference files 2.20
1385         * ks_p11.c: add more mechflags
1387         * name.c (no): add OU and sort
1389         * revoke.c: pass context to _hx509_create_signature
1391         * ks_p11.c (p11_printinfo): print proper plural s
1393         * ks_p11.c: save the mechs supported when initing the token, print
1394         them in printinfo.
1396         * hx_locl.h: Include <parse_units.h>.
1398         * cms.c: pass context to _hx509_create_signature
1400         * req.c: pass context to _hx509_create_signature
1402         * keyset.c (hx509_certs_info): print information about the keyset.
1404         * hxtool.c (pcert_print) print keystore info when --info flag is
1405         given.
1407         * hxtool-commands.in: Add hxtool print --info.
1409         * test_query.in: Test hxtool print --info.
1411         * hx_locl.h (hx509_keyset_ops): add printinfo
1413         * crypto.c: Start to hang the private key operations of the
1414         private key, pass hx509_context to create_checksum.
1415         
1416 2006-05-29  Love Hörnquist Åstrand  <lha@it.su.se>
1418         * ks_p11.c: Iterate over all slots, not just the first/selected
1419         one.
1420         
1421 2006-05-27  Love Hörnquist Åstrand  <lha@it.su.se>
1423         * cert.c: Add release function for certifiates so backend knowns
1424         when its no longer used.
1426         * ks_p11.c: Add reference counting on certifiates, push out
1427         CK_SESSION_HANDLE from slot.
1429         * cms.c: sprinkle more hx509_clear_error_string
1431 2006-05-22  Love Hörnquist Åstrand  <lha@it.su.se>
1433         * ks_p11.c: Sprinkle some hx509_set_error_strings
1434         
1435 2006-05-13  Love Hörnquist Åstrand  <lha@it.su.se>
1436         
1437         * hxtool.c: Avoid shadowing.
1439         * revoke.c: Avoid shadowing.
1441         * ks_file.c: Avoid shadowing.
1443         * cert.c: Avoid shadowing.
1444         
1445 2006-05-12  Love Hörnquist Åstrand  <lha@it.su.se>
1447         * lock.c (hx509_prompt_hidden): reshuffle to avoid gcc warning
1448         
1449         * hx509.h: Reshuffle the prompter types, remove the hidden field.
1451         * lock.c (hx509_prompt_hidden): return if the prompt should be
1452         hidden or not
1454         * revoke.c (hx509_revoke_free): allow free of NULL.
1455         
1456 2006-05-11  Love Hörnquist Åstrand  <lha@it.su.se>
1458         * ks_file.c (file_init): Avoid shadowing ret (and thus avoiding
1459         crashing).
1461         * ks_dir.c: Implement DIR: caches useing FILE: caches.
1463         * ks_p11.c: Catch more errors.
1464         
1465 2006-05-08  Love Hörnquist Åstrand  <lha@it.su.se>
1466         
1467         * crypto.c (hx509_crypto_encrypt): free correctly in error
1468         path. From Andrew Bartlett.
1470         * crypto.c: If RAND_bytes fails, then we will attempt to
1471         double-free crypt->key.data.  From Andrew Bartlett.
1472         
1473 2006-05-05  Love Hörnquist Åstrand  <lha@it.su.se>
1474         
1475         * name.c: Rename u_intXX_t to uintXX_t
1476         
1477 2006-05-03  Love Hörnquist Åstrand  <lha@it.su.se>
1479         * TODO: More to do about the about the PKCS11 code.
1481         * ks_p11.c: Use the prompter from the lock function.
1483         * lock.c: Deal with that hx509_prompt.reply is no longer a
1484         pointer.
1486         * hx509.h: Make hx509_prompt.reply not a pointer.
1487         
1488 2006-05-02  Love Hörnquist Åstrand  <lha@it.su.se>
1490         * keyset.c: Sprinkle setting error strings.
1492         * crypto.c: Sprinkle setting error strings.
1494         * collector.c: Sprinkle setting error strings.
1496         * cms.c: Sprinkle setting error strings.
1497         
1498 2006-05-01  Love Hörnquist Åstrand  <lha@it.su.se>
1499         
1500         * test_name.c: renamed one error code
1502         * name.c: renamed one error code
1504         * ks_p11.c: _hx509_set_cert_attribute changed signature
1506         * hxtool.c (pcert_print): use hx509_err so I can test it
1508         * error.c (hx509_set_error_stringv): clear errors on malloc
1509         failure
1511         * hx509_err.et: Add some more errors
1513         * cert.c: Sprinkle setting error strings.
1515         * cms.c: _hx509_path_append changed signature.
1517         * revoke.c: changed signature of _hx509_check_key_usage
1519         * keyset.c: changed signature of _hx509_query_match_cert
1521         * hx509.h: Add support for error strings.
1523         * cms.c: changed signature of _hx509_check_key_usage
1525         * Makefile.am: ibhx509_la_files += error.c
1527         * ks_file.c: Sprinkel setting error strings.
1529         * cert.c: Sprinkel setting error strings.
1531         * hx_locl.h: Add support for error strings.
1533         * error.c: Add string error handling functions.
1535         * keyset.c (hx509_certs_init): pass the right error code back
1536         
1537 2006-04-30  Love Hörnquist Åstrand  <lha@it.su.se>
1539         * revoke.c: Revert previous patch.
1540         (hx509_ocsp_verify): new function that returns the expiration of
1541         certificate in ocsp data-blob
1543         * cert.c: Reverse previous patch, lets do it another way.
1545         * cert.c (hx509_revoke_verify): update usage
1547         * revoke.c: Make compile.
1549         * revoke.c: Add the expiration time the crl/ocsp info expire
1551         * name.c: Add hx509_name_is_null_p
1553         * cert.c: remove _hx509_cert_private_sigature
1554         
1555 2006-04-29  Love Hörnquist Åstrand  <lha@it.su.se>
1556         
1557         * name.c: Expose more of Name.
1559         * hxtool.c (main): add missing argument to printf
1561         * data/openssl.cnf: Add EKU for the KDC certificate
1563         * cert.c (hx509_cert_get_base_subject): reject un-canon proxy
1564         certs, not the reverse
1565         (add_to_list): constify and fix argument order to
1566         copy_octet_string
1567         (hx509_cert_find_subjectAltName_otherName): make work
1568         
1569 2006-04-28  Love Hörnquist Åstrand  <lha@it.su.se>
1571         * data/{pkinit,kdc}.{crt,key}: pkinit certificates
1573         * data/gen-req.sh: Generate pkinit certificates.
1575         * data/openssl.cnf: Add pkinit glue.
1577         * cert.c (hx509_verify_hostname): implement stub function
1578         
1579 2006-04-27  Love Hörnquist Åstrand  <lha@it.su.se>
1581         * TODO: CRL delta support
1583 2006-04-26 Love Hörnquist Åstrand <lha@it.su.se>
1584         
1585         * data/.cvsignore: ignore leftover from OpenSSL cert generation
1587         * hx509_err.et: Add name malformated error
1589         * name.c (hx509_parse_name): don't abort on error, rather return
1590         error
1592         * test_name.c: Test failure parsing name.
1594         * cert.c: When verifying certificates, store subject basename for
1595         later consumption.
1597         * test_name.c: test to parse and print name and check that they
1598         are the same.
1600         * name.c (hx509_parse_name): fix length argument to printf string
1602         * name.c (hx509_parse_name): fix length argument to stringtooid, 1
1603         too short.
1605         * cert.c: remove debug printf's
1607         * name.c (hx509_parse_name): make compile pre c99
1609         * data/gen-req.sh: OpenSSL have a serious issue of user confusion
1610         -subj in -ca takes the arguments in LDAP order. -subj for x509
1611         takes it in x509 order.
1613         * cert.c (hx509_verify_path): handle the case where the where two
1614         proxy certs in a chain.
1616         * test_chain.in: enable two proxy certificates in a chain test
1618         * test_chain.in: tests proxy certificates
1620         * data: re-gen
1622         * data/gen-req.sh: build proxy certificates
1623         
1624         * data/openssl.cnf: add def for proxy10_cert
1626         * hx509_err.et: Add another proxy certificate error.
1628         * cert.c (hx509_verify_path): Need to mangle name to remove the CN
1629         of the subject, copying issuer only works for one level but is
1630         better then doing no checking at all.
1632         * hxtool.c: Add verify --allow-proxy-certificate.
1634         * hxtool-commands.in: add verify --allow-proxy-certificate
1636         * hx509_err.et: Add proxy certificate errors.
1638         * cert.c: Fix comment about subject name of proxy certificate.
1640         * test_chain.in: tests for proxy certs
1642         * data/gen-req.sh: gen proxy and non-proxy tests certificates
1644         * data/openssl.cnf: Add definition for proxy certs
1646         * data/*proxy-test.*: Add proxy certificates
1648         * cert.c (hx509_verify_path): verify proxy certificate have no san
1649         or ian
1651         * cert.c (hx509_verify_set_proxy_certificate): Add
1652         (*): rename policy cert to proxy cert
1654         * cert.c: Initial support for proxy certificates.
1655         
1656 2006-04-24  Love Hörnquist Åstrand  <lha@it.su.se>
1658         * hxtool.c: some error checking
1660         * name.c: Switch over to asn1 generaed oids.
1662         * TODO: merge with old todo file
1663         
1664 2006-04-23 Love Hörnquist Åstrand <lha@it.su.se>
1666         * test_query.in: make quiet
1668         * test_req.in: SKIP test if there is no RSA support.
1670         * hxtool.c: print dh method too
1672         * test_chain.in: SKIP test if there is no RSA support.
1673         
1674         * test_cms.in: SKIP test if there is no RSA support.
1676         * test_nist.in: SKIP test if there is no RSA support.
1677         
1678 2006-04-22  Love Hörnquist Åstrand  <lha@it.su.se>
1680         * hxtool-commands.in: Allow passing in pool and anchor to
1681         signedData
1683         * hxtool.c: Allow passing in pool and anchor to signedData
1685         * test_cms.in: Test that certs in signed data is picked up.
1687         * hx_locl.h: Expose the path building function to internal
1688         functions.
1690         * cert.c: Expose the path building function to internal functions.
1692         * hxtool-commands.in: cms-envelope: Add support for choosing the
1693         encryption type
1695         * hxtool.c (cms_create_enveloped): Add support for choosing the
1696         encryption type
1698         * test_cms.in: Test generating des-ede3 aes-128 aes-256 enveloped
1699         data
1701         * crypto.c: Add names to cipher types.
1703         * cert.c (hx509_query_match_friendly_name): fix return value
1705         * data/gen-req.sh: generate tests for enveloped data using
1706         des-ede3 and aes256
1708         * test_cms.in: add tests for enveloped data using des-ede3 and
1709         aes256
1711         * cert.c (hx509_query_match_friendly_name): New function.
1712         
1713 2006-04-21  Love Hörnquist Åstrand  <lha@it.su.se>
1714         
1715         * ks_p11.c: Add support for parsing slot-number.
1717         * crypto.c (oid_private_rc2_40): simply
1719         * crypto.c: Use oids from asn1 generator.
1721         * ks_file.c (file_init): reset length when done with a part
1723         * test_cms.in: check with test.combined.crt.
1725         * data/gen-req.sh: Create test.combined.crt.
1727         * test_cms.in: Test signed data using keyfile that is encrypted.
1729         * ks_file.c: Remove (commented out) debug printf
1731         * ks_file.c (parse_rsa_private_key): use EVP_get_cipherbyname
1733         * ks_file.c (parse_rsa_private_key): make working for one
1734         password.
1736         * ks_file.c (parse_rsa_private_key): Implement enought for
1737         testing.
1739         * hx_locl.h: Add <ctype.h>
1741         * ks_file.c: Add glue code for PEM encrypted password files.
1743         * test_cms.in: Add commeted out password protected PEM file,
1744         remove password for those tests that doesn't need it.
1746         * test_cms.in: adapt test now that we can use any certificate and
1747         trust anchor
1749         * collector.c: handle PEM RSA PRIVATE KEY files
1751         * cert.c: Remove unused function.
1753         * ks_dir.c: move code here from ks_file.c now that its no longer
1754         used.
1756         * ks_file.c: Add support for parsing unencrypted RSA PRIVATE KEY
1758         * crypto.c: Handle rsa private keys better.
1759         
1760 2006-04-20  Love Hörnquist Åstrand <lha@it.su.se>
1762         * hxtool.c: Use hx509_cms_{,un}wrap_ContentInfo
1764         * cms.c: Make hx509_cms_{,un}wrap_ContentInfo usable in asn1
1765         un-aware code.
1767         * cert.c (hx509_verify_path): if trust anchor is not self signed,
1768         don't check sig From Douglas Engert.
1770         * test_chain.in: test "sub-cert -> sub-ca"
1771         
1772         * crypto.c: Use the right length for the sha256 checksums.
1773         
1774 2006-04-15  Love Hörnquist Åstrand  <lha@it.su.se>
1776         * crypto.c: Fix breakage from sha256 code.
1778         * crypto.c: Add SHA256 support, and symbols for the other new
1779         SHA-2 types.
1780         
1781 2006-04-14  Love Hörnquist Åstrand  <lha@it.su.se>
1783         * test_cms.in: test rc2-40 rc2-64 rc2-128 enveloped data
1784         
1785         * data/test-enveloped-rc2-{40,64,128}: add tests cases for rc2
1787         * cms.c: Update prototypes changes for hx509_crypto_[gs]et_params.
1789         * crypto.c: Break out the parameter handling code for encrypting
1790         data to handle RC2.  Needed for Windows 2k pk-init support.
1791         
1792 2006-04-04  Love Hörnquist Åstrand <lha@it.su.se>
1794         * Makefile.am: Split libhx509_la_SOURCES into build file and
1795         distributed files so we can avoid building prototypes for
1796         build-files.
1797         
1798 2006-04-03  Love Hörnquist Åstrand  <lha@it.su.se>
1800         * TODO: split certificate request into pkcs10 and CRMF
1802         * hxtool-commands.in: Add nonce flag to ocsp-fetch
1804         * hxtool.c: control sending nonce
1806         * hxtool.c (request_create): store the request in a file, no in
1807         bitbucket.
1809         * cert.c: expose print_cert_subject internally
1811         * hxtool.c: Add ocsp_print.
1813         * hxtool-commands.in: New command "ocsp-print".
1815         * hx_locl.h: Include <hex.h>.
1817         * revoke.c (verify_ocsp): require issuer to match too.
1818         (free_ocsp): new function
1819         (hx509_revoke_ocsp_print): new function, print ocsp reply
1821         * Makefile.am: build CRMF files
1823         * data/key.der: needed for cert request test
1825         * test_req.in: adapt to rename of pkcs10-create to request-create
1827         * hxtool.c: adapt to rename of pkcs10-create to request-create
1829         * hxtool-commands.in: Rename pkcs10-create to request-create
1831         * crypto.c: (_hx509_parse_private_key): Avoid crashing on bad input.
1833         * hxtool.c (pkcs10_create): use opt->subject_string
1835         * hxtool-commands.in: Add pkcs10-create --subject
1837         * Makefile.am: Add test_req to tests.
1838         
1839         * test_req.in: Test for pkcs10 commands.
1841         * name.c (hx509_parse_name): new function.
1843         * hxtool.c (pkcs10_create): implement
1845         * hxtool-commands.in (pkcs10-create): Add arguments
1847         * crypto.c: Add _hx509_private_key2SPKI and support
1848         functions (only support RSA for now).
1849         
1850 2006-04-02  Love Hörnquist Åstrand  <lha@it.su.se>
1851         
1852         * hxtool-commands.in: Add pkcs10-create command.
1854         * hx509.h: Add hx509_request.
1856         * TODO: more stuff
1858         * Makefile.am: Add req.c
1860         * req.c: Create certificate requests, prototype converts the
1861         request in a pkcs10 packet.
1863         * hxtool.c: Add pkcs10_create
1865         * name.c (hx509_name_copy): new function.
1866         
1867 2006-04-01  Love Hörnquist Åstrand  <lha@it.su.se>
1869         * TODO: fill out what do
1871         * hxtool-commands.in: add pkcs10-print
1873         * hx_locl.h: Include <pkcs10_asn1.h>.
1875         * pkcs10.asn1: PKCS#10
1877         * hxtool.c (pkcs10_print): new function.
1879         * test_chain.in: test ocsp keyhash
1881         * data: generate ocsp keyhash version too
1883         * revoke.c (load_ocsp): test that we got back a BasicReponse
1885         * ocsp.asn1: Add asn1_id_pkix_ocsp*.
1887         * Makefile.am: Add asn1_id_pkix_ocsp*.
1889         * cert.c: Add HX509_QUERY_MATCH_KEY_HASH_SHA1
1891         * hx_locl.h: Add HX509_QUERY_MATCH_KEY_HASH_SHA1
1893         * revoke.c: Support OCSPResponderID.byKey, indent.
1895         * revoke.c (hx509_ocsp_request): Add nonce to ocsp request.
1897         * hxtool.c: Add nonce to ocsp request.
1899         * test_chain.in: Added crl tests
1900         
1901         * data/nist-data: rename missing-crl to missing-revoke
1903         * data: make ca use openssl ca command so we can add ocsp tests,
1904         and regen certs
1906         * test_chain.in: Add revoked ocsp cert test
1908         * cert.c: rename missing-crl to missing-revoke
1910         * revoke.c: refactor code, fix a un-init-ed variable
1911         
1912         * test_chain.in: rename missing-crl to missing-revoke add ocsp
1913         tests
1915         * test_cms.in: rename missing-crl to missing-revoke
1917         * hxtool.c: rename missing-crl to missing-revoke
1919         * hxtool-commands.in: rename missing-crl to missing-revoke
1920         
1921         * revoke.c: Plug one memory leak.
1923         * revoke.c: Renamed generic CRL related errors.
1924         
1925         * hx509_err.et: Comments and renamed generic CRL related errors
1926         
1927         * revoke.c: Add ocsp checker.
1929         * ocsp.asn1: Add id-kp-OCSPSigning
1931         * hxtool-commands.in: add url-path argument to ocsp-fetch
1933         * hxtool.c: implement ocsp-fetch
1935         * cert.c: Use HX509_DEFAULT_OCSP_TIME_DIFF.
1936         
1937         * hx_locl.h: Add ocsp_time_diff to hx509_context
1939         * crypto.c (_hx509_verify_signature_bitstring): new function,
1940         commonly use when checking certificates
1942         * cms.c (hx509_cms_envelope_1): check for internal ASN.1 encoder
1943         error
1945         * cert.c: Add ocsp glue, use new
1946         _hx509_verify_signature_bitstring, add eku checking function.
1947         
1948 2006-03-31  Love Hörnquist Åstrand  <lha@it.su.se>
1950         * Makefile.am: add id_kp_OCSPSigning.x
1952         * revoke.c: Pick out certs in ocsp response
1954         * TODO: list of stuff to verify
1956         * revoke.c: Add code to load OCSPBasicOCSPResponse files, reload
1957         crl when its changed on disk.
1959         * cert.c: Update for ocsp merge. handle building path w/o
1960         subject (using subject key id)
1962         * ks_p12.c: _hx509_map_file changed prototype.
1964         * file.c: _hx509_map_file changed prototype, returns struct stat
1965         if requested.
1967         * ks_file.c: _hx509_map_file changed prototype.
1969         * hxtool.c: Add stub for ocsp-fetch, _hx509_map_file changed
1970         prototype, add ocsp parsing to verify command.
1972         * hx_locl.h: rename HX509_CTX_CRL_MISSING_OK to
1973         HX509_CTX_VERIFY_MISSING_OK now that we have OCSP glue
1974         
1975 2006-03-30  Love Hörnquist Åstrand  <lha@it.su.se>
1977         * hx_locl.h: Add <krb5-types.h> to make it compile on Solaris,
1978         from Alex V. Labuta.
1979         
1980 2006-03-28  Love Hörnquist Åstrand  <lha@it.su.se>
1981         
1982         * crypto.c (_hx509_pbe_decrypt): try all passwords, not just the
1983         first one.
1984         
1985 2006-03-27  Love Hörnquist Åstrand  <lha@it.su.se>
1987         * print.c (check_altName): Print the othername oid.
1989         * crypto.c: Manual page claims RSA_public_decrypt will return -1
1990         on error, lets check for that
1991         
1992         * crypto.c (_hx509_pbe_decrypt): also try the empty password
1994         * collector.c (match_localkeyid): no need to add back the cert to
1995         the cert pool, its already there.
1997         * crypto.c: Add REQUIRE_SIGNER
1999         * cert.c (hx509_cert_free): ok to free NULL
2001         * hx509_err.et: Add new error code SIGNATURE_WITHOUT_SIGNER.
2003         * name.c (_hx509_name_ds_cmp): make DirectoryString case
2004         insenstive
2005         (hx509_name_to_string): less spacing
2007         * cms.c: Check for signature error, check consitency of error
2008         
2009 2006-03-26  Love Hörnquist Åstrand  <lha@it.su.se>
2011         * collector.c (_hx509_collector_alloc): handle errors
2013         * cert.c (hx509_query_alloc): allocate slight more more then a
2014         sizeof(pointer)
2016         * crypto.c (_hx509_private_key_assign_key_file): ask for password
2017         if nothing matches.
2019         * cert.c: Expose more of the hx509_query interface.
2021         * collector.c: hx509_certs_find is now exposed.
2023         * cms.c: hx509_certs_find is now exposed.
2025         * revoke.c: hx509_certs_find is now exposed.
2027         * keyset.c (hx509_certs_free): allow free-ing NULL
2028         (hx509_certs_find): expose
2029         (hx509_get_one_cert): new function
2031         * hxtool.c: hx509_certs_find is now exposed.
2033         * hx_locl.h: Remove hx509_query, its exposed now.
2035         * hx509.h: Add hx509_query.
2036         
2037 2006-02-22  Love Hörnquist Åstrand  <lha@it.su.se>
2039         * cert.c: Add exceptions for null (empty) subjectNames
2041         * data/nist-data: Add some more name constraints tests.
2043         * data/nist-data: Add some of the test from 4.13 Name Constraints.
2045         * cert.c: Name constraits needs to be evaluated in block as they
2046         appear in the certificates, they can not be joined to one
2047         list. One example of this is:
2048         
2049         - cert is cn=foo,dc=bar,dc=baz
2050         - subca is dc=foo,dc=baz with name restriction dc=kaka,dc=baz
2051         - ca is dc=baz with name restriction dc=baz
2052         
2053         If the name restrictions are merged to a list, the certificate
2054         will pass this test.
2056 2006-02-14 Love Hörnquist Åstrand <lha@it.su.se>
2058         * cert.c: Handle more name constraints cases.
2060         * crypto.c (dsa_verify_signature): if test if malloc failed
2062 2006-01-31  Love Hörnquist Åstrand  <lha@it.su.se>
2064         * cms.c: Drop partial pkcs12 string2key implementation.
2065         
2066 2006-01-20  Love Hörnquist Åstrand  <lha@it.su.se>
2068         * data/nist-data: Add commited out DSA tests (they fail).
2070         * data/nist-data: Add 4.2 Validity Periods.
2072         * test_nist.in: Make less verbose to use.
2074         * Makefile.am: Add test_nist_cert.
2076         * data/nist-data: Add some more CRL-tests.
2078         * test_nist.in: Print $id instead of . when running the tests.
2080         * test_nist.in: Drop verifying certifiates, its done in another
2081         test now.
2083         * data/nist-data: fixup kill-rectangle leftovers
2085         * data/nist-data: Drop verifying certifiates, its done in another
2086         test now.  Add more crl tests. comment out all unused tests.
2088         * test_nist_cert.in: test parse all nist certs
2089         
2090 2006-01-19  Love Hörnquist Åstrand  <lha@it.su.se>
2092         * hx509_err.et: Add HX509_CRL_UNKNOWN_EXTENSION.
2094         * revoke.c: Check for unknown extentions in CRLs and CRLEntries.
2096         * test_nist.in: Parse new format to handle CRL info.
2098         * test_chain.in: Add --missing-crl.
2100         * name.c (hx509_unparse_der_name): Rename from hx509_parse_name.
2101         (_hx509_unparse_Name): Add.
2103         * hxtool-commands.in: Add --missing-crl to verify commands.
2105         * hx509_err.et: Add CRL errors.
2107         * cert.c (hx509_context_set_missing_crl): new function Add CRL
2108         handling.
2110         * hx_locl.h: Add HX509_CTX_CRL_MISSING_OK.
2112         * revoke.c: Parse and verify CRLs (simplistic).
2114         * hxtool.c: Parse CRL info.
2116         * data/nist-data: Change format so we can deal with CRLs, also
2117         note the test-id from PKITS.
2119         * data: regenerate test
2120         
2121         * data/gen-req.sh: use static-file to generate tests
2122         
2123         * data/static-file: new file to use for commited tests
2125         * test_cms.in: Use static file, add --missing-crl.
2126         
2127 2006-01-18  Love Hörnquist Åstrand <lha@it.su.se>
2129         * print.c: Its cRLReason, not cRLReasons.
2131         * hxtool.c: Attach revoke context to verify context.
2133         * data/nist-data: change syntax to make match better with crl
2134         checks
2136         * cert.c: Verify no certificates has been revoked with the new
2137         revoke interface.
2139         * Makefile.am: libhx509_la_SOURCES += revoke.c
2141         * revoke.c: Add framework for handling CRLs.
2143         * hx509.h: Add hx509_revoke_ctx.
2144         
2145 2006-01-13  Love Hörnquist Åstrand  <lha@it.su.se>
2147         * delete crypto_headers.h, use global file instead.
2149         * crypto.c (PBE_string2key): libdes now supports PKCS12_key_gen
2150         
2151 2006-01-12  Love Hörnquist Åstrand  <lha@it.su.se>
2153         * crypto_headers.h: Need BN_is_negative too.
2154         
2155 2006-01-11  Love Hörnquist Åstrand  <lha@it.su.se>
2156         
2157         * ks_p11.c (p11_rsa_public_decrypt): since is wrong, don't provide
2158         it. PKCS11 can't do public_decrypt, it support verify though. All
2159         this doesn't matter, since the code never go though this path.
2161         * crypto_headers.h: Provide glue to compile with less warnings
2162         with OpenSSL
2163         
2164 2006-01-08  Love Hörnquist Åstrand  <lha@it.su.se>
2165         
2166         * Makefile.am: Depend on LIB_des
2168         * lock.c: Use "crypto_headers.h".
2170         * crypto_headers.h: Include the two diffrent implementation of
2171         crypto headers.
2173         * cert.c: Use "crypto-headers.h". Load ENGINE configuration.
2175         * crypto.c: Make compile with both OpenSSL and heimdal libdes.
2177         * ks_p11.c: Add code for public key decryption (not supported yet)
2178         and use "crypto-headers.h".
2179         
2181 2006-01-04 Love Hörnquist Åstrand <lha@it.su.se>
2182         
2183         * add a hx509_context where we can store configuration
2185         * p11.c,Makefile.am: pkcs11 is now supported by library, remove
2186         old files.
2188         * ks_p11.c: more paranoid on refcount, set refcounter ealier,
2189         reset pointers after free
2191         * collector.c (struct private_key): remove temporary key data
2192         storage, convert directly to a key
2193         (match_localkeyid): match certificate and key using localkeyid
2194         (match_keys): match certificate and key using _hx509_match_keys
2195         (_hx509_collector_collect): rewrite to use match_keys and
2196         match_localkeyid
2198         * crypto.c (_hx509_match_keys): function that determins if a
2199         private key matches a certificate, used when there is no
2200         localkeyid.
2201         (*) reset free pointer
2203         * ks_file.c: Rewrite to use collector and mapping support
2204         function.
2206         * ks_p11.c (rsa_pkcs1_method): constify
2208         * ks_p11.c: drop extra wrapping of p11_init
2210         * crypto.c (_hx509_private_key_assign_key_file): use function to
2211         extact rsa key
2213         * cert.c: Revert previous, refcounter is unsigned, so it can never
2214         be negative.
2216         * cert.c (hx509_cert_ref): more refcount paranoia
2218         * ks_p11.c: Implement rsa_private_decrypt and add stubs for public
2219         ditto.
2221         * ks_p11.c: Less printf, less memory leaks.
2223         * ks_p11.c: Implement signing using pkcs11.
2224         
2225         * ks_p11.c: Partly assign private key, enough to complete
2226         collection, but not any crypto functionallity.
2228         * collector.c: Use hx509_private_key to assign private keys.
2230         * crypto.c: Remove most of the EVP_PKEY code, and use RSA
2231         directly, this temporary removes DSA support.
2233         * hxtool.c (print_f): print if there is a friendly name and if
2234         there is a private key
2235         
2236 2006-01-03  Love Hörnquist Åstrand  <lha@it.su.se>
2238         * name.c: Avoid warning from missing __attribute__((noreturn))
2240         * lock.c (_hx509_lock_unlock_certs): return unlock certificates
2242         * crypto.c (_hx509_private_key_assign_ptr): new function, exposes
2243         EVP_PKEY
2244         (_hx509_private_key_assign_key_file): remember to free private key
2245         if there is one.
2247         * cert.c (_hx509_abort): add newline to output and flush stdout
2249         * Makefile.am: libhx509_la_SOURCES += collector.c
2251         * hx_locl.h: forward type declaration of struct hx509_collector.
2253         * collector.c: Support functions to collect certificates and
2254         private keys and then match them.
2256         * ks_p12.c: Use the new hx509_collector support functions.
2258         * ks_p11.c: Add enough glue to support certificate iteration.
2260         * test_nist_pkcs12.in: Less verbose.
2262         * cert.c (hx509_cert_free): if there is a private key assosited
2263         with this cert, free it
2265         * print.c: Use _hx509_abort.
2267         * ks_p12.c: Use _hx509_abort.
2269         * hxtool.c: Use _hx509_abort.
2271         * crypto.c: Use _hx509_abort.
2273         * cms.c: Use _hx509_abort.
2275         * cert.c: Use _hx509_abort.
2277         * name.c: use _hx509_abort
2278         
2279 2006-01-02  Love Hörnquist Åstrand  <lha@it.su.se>
2281         * name.c (hx509_name_to_string): don't cut bmpString in half.
2283         * name.c (hx509_name_to_string): don't overwrite with 1 byte with
2284         bmpString.
2286         * ks_file.c (parse_certificate): avoid stomping before array
2288         * name.c (oidtostring): avoid leaking memory
2290         * keyset.c: Add _hx509_ks_dir_register.
2292         * Makefile.am (libhx509_la_SOURCES): += ks_dir.c
2294         * hxtool-commands.in: Remove pkcs11.
2296         * hxtool.c: Remove pcert_pkcs11.
2298         * ks_file.c: Factor out certificate parsing code.
2300         * ks_dir.c: Add new keystore that treats all files in a directory
2301         a keystore, useful for regression tests.
2302         
2303 2005-12-12  Love Hörnquist Åstrand  <lha@it.su.se>
2305         * test_nist_pkcs12.in: Test parse PKCS12 files from NIST.
2307         * data/nist-data: Can handle DSA certificate.
2308         
2309         * hxtool.c: Print error code on failure.
2310         
2311 2005-10-29  Love Hörnquist Åstrand  <lha@it.su.se>
2313         * crypto.c: Support DSA signature operations.
2314         
2315 2005-10-04  Love Hörnquist Åstrand  <lha@it.su.se>
2317         * print.c: Validate that issuerAltName and subjectAltName isn't
2318         empty.
2319         
2320 2005-09-14  Love Hörnquist Åstrand  <lha@it.su.se>
2322         * p11.c: Cast to unsigned char to avoid warning.
2324         * keyset.c: Register pkcs11 module.
2326         * Makefile.am: Add ks_p11.c, install hxtool.
2327         
2328         * ks_p11.c: Starting point of a pkcs11 module.
2329         
2330 2005-09-04  Love Hörnquist Åstrand  <lha@it.su.se>
2332         * lock.c: Implement prompter.
2334         * hxtool-commands.in: add --content to print
2336         * hxtool.c: Split verify and print.
2338         * cms.c: _hx509_pbe_decrypt now takes a hx509_lock.
2340         * crypto.c: Make _hx509_pbe_decrypt take a hx509_lock, workaround
2341         for empty password.
2343         * name.c: Add DC, handle all Directory strings, fix signless
2344         problems.
2345         
2346 2005-09-03  Love Hörnquist Åstrand  <lha@it.su.se>
2348         * test_query.in: Pass in --pass to all commands.
2350         * hxtool.c: Use option --pass.
2352         * hxtool-commands.in: Add --pass to all commands.
2354         * hx509_err.et: add UNKNOWN_LOCK_COMMAND and CRYPTO_NO_PROMPTER
2356         * test_cms.in: pass in password to cms-create-sd
2358         * crypto.c: Abstract out PBE_string2key so I can add PBE2 s2k
2359         later.  Avoid signess warnings with OpenSSL.
2361         * cms.c: Use void * instead of char * for to avoid signedness
2362         issues
2364         * cert.c (hx509_cert_get_attribute): remove const, its not
2366         * ks_p12.c: Cast size_t to unsigned long when print.
2368         * name.c: Fix signedness warning.
2370         * test_query.in: Use echo, the function check isn't defined here.
2371         
2372 2005-08-11  Love Hörnquist Åstrand  <lha@it.su.se>
2374         * hxtool-commands.in: Add more options that was missing.
2376 2005-07-28  Love Hörnquist Åstrand  <lha@it.su.se>
2378         * test_cms.in: Use --certificate= for enveloped/unenvelope.
2380         * hxtool.c: Use --certificate= for enveloped/unenvelope.  Clean
2381         up.
2383         * test_cms.in: add EnvelopeData tests
2384         
2385         * hxtool.c: use id-envelopedData for ContentInfo
2386         
2387         * hxtool-commands.in: add contentinfo wrapping for create/unwrap
2388         enveloped data
2390         * hxtool.c: add contentinfo wrapping for create/unwrap enveloped
2391         data
2393         * data/gen-req.sh: add enveloped data (aes128)
2394         
2395         * crypto.c: add "new" RC2 oid
2396         
2397 2005-07-27  Love Hörnquist Åstrand  <lha@it.su.se>
2399         * hx_locl.h, cert.c: Add HX509_QUERY_MATCH_FUNCTION that allows
2400         caller to match by function, note that this doesn't not work
2401         directly for backends that implements ->query, they must do their
2402         own processing. (I'm running out of flags, only 12 left now)
2404         * test_cms.in: verify ContentInfo wrapping code in hxtool
2405         
2406         * hxtool-commands.in (cms_create_sd): support wrapping in content
2407         info spelling
2409         * hxtool.c (cms_create_sd): support wrapping in content info
2411         * test_cms.in: test more cms signeddata messages
2412         
2413         * data/gen-req.sh: generate SignedData
2414         
2415         * hxtool.c (cms_create_sd): support certificate store, add support
2416         to unwrap a ContentInfo the SignedData inside.
2418         * crypto.c: sprinkel rk_UNCONST
2420         * crypto.c: add DER NULL to the digest oid's
2422         * hxtool-commands.in: add --content-info to cms-verify-sd
2424         * cms.c (hx509_cms_create_signed_1): pass in a full
2425         AlgorithmIdentifier instead of heim_oid for digest_alg
2427         * crypto.c: make digest_alg a digest_oid, it's not needed right
2428         now
2430         * hx509_err.et: add CERT_NOT_FOUND
2431         
2432         * keyset.c (_hx509_certs_find): add error code for cert not
2433         found
2435         * cms.c (hx509_cms_verify_signed): add external store of
2436         certificates, use the right digest algorithm identifier.
2438         * cert.c: fix const warning
2440         * ks_p12.c: slightly less verbose
2441         
2442         * cert.c: add hx509_cert_find_subjectAltName_otherName, add
2443         HX509_QUERY_MATCH_FRIENDLY_NAME
2444         
2445         * hx509.h: add hx509_octet_string_list, remove bad comment
2446         
2447         * hx_locl.h: add HX509_QUERY_MATCH_FRIENDLY_NAME
2449         * keyset.c (hx509_certs_append): needs a hx509_lock, add one
2451         * Makefile.am: add test cases tempfiles to CLEANFILES
2452         
2453         * Makefile.am: add test_query to TESTS, fix dependency on hxtool
2454         sources on hxtool-commands.h
2456         * hxtool-commands.in: explain what signer is for create-sd
2458         * hxtool.c: add query, add more options to verify-sd and create-sd
2460         * test_cms.in: add more cms tests
2461         
2462         * hxtool-commands.in: add query, add more options to verify-sd
2464         * test_query.in: test query interface
2465         
2466         * data: fix filenames for ds/ke files, add pkcs12 files, regen
2467         
2468         * hxtool.c,Makefile.am,hxtool-commands.in: switch to slc
2470 2005-07-26  Love Hörnquist Åstrand  <lha@it.su.se>
2472         * cert.c (hx509_verify_destroy_ctx): add
2473         
2474         * hxtool.c: free hx509_verify_ctx
2475         
2476         * name.c (_hx509_name_ds_cmp): make sure all strings are not equal
2478 2005-07-25  Love Hörnquist Åstrand  <lha@it.su.se>
2480         * hxtool.c: return error
2481         
2482         * keyset.c: return errors from iterations
2483         
2484         * test_chain.in: clean up checks
2485         
2486         * ks_file.c (parse_certificate): return errno's not 1 in case of
2487         error
2488         
2489         * ks_file.c (file_iter): make sure endpointer is NULL
2491         * ks_mem.c (mem_iter): follow conversion and return NULL when we
2492         get to the end, not ENOENT.
2493         
2494         * Makefile.am: test_chain depends on hxtool
2495         
2496         * data: test certs that lasts 10 years
2497         
2498         * data/gen-req.sh: script to generate test certs
2499         
2500         * Makefile.am: Add regression tests.
2502         * data: test certificate and keys
2504         * test_chain.in: test chain
2506         * hxtool.c (cms_create_sd): add KU digitalSigature as a
2507         requirement to the query
2509         * hx_locl.h: add KeyUsage query bits
2511         * hx509_err.et: add KeyUsage error
2513         * cms.c: add checks for KeyUsage
2515         * cert.c: more checks on KeyUsage, allow to query on them too
2517 2005-07-24  Love Hörnquist Åstrand  <lha@it.su.se>
2519         * cms.c: Add missing break.
2520         
2521         * hx_locl.h,cms.c,cert.c: allow matching on SubjectKeyId
2523         * hxtool.c: Use _hx509_map_file, _hx509_unmap_file and
2524         _hx509_write_file.
2526         * file.c (_hx509_write_file): in case of write error, return errno
2528         * file.c (_hx509_write_file): add a function that write a data
2529         blob to disk too
2531         * Fix id-tags
2533         * Import mostly complete X.509 and CMS library. Handles, PEM, DER,
2534         PKCS12 encoded certicates.  Verificate RSA chains and handled
2535         CMS's SignedData, and EnvelopedData.