1 2007-12-26 Love Hörnquist Åstrand <lha@it.su.se>
5 2007-12-17 Love Hörnquist Åstrand <lha@it.su.se>
9 2007-12-16 Love Hörnquist Åstrand <lha@it.su.se>
13 2007-12-15 Love Hörnquist Åstrand <lha@it.su.se>
17 * lock.c: Add page referance
19 * keyset.c: some more documentation.
21 * cms.c: Doxygen documentation.
23 2007-12-11 Love Hörnquist Åstrand <lha@it.su.se>
25 * *.[ch]: More documentation
27 2007-12-09 Love Hörnquist Åstrand <lha@it.su.se>
29 * handle refcount on NULL.
31 * test_nist_pkcs12.in: drop echo -n, doesn't work with posix sh
33 2007-12-08 Love Hörnquist Åstrand <lha@it.su.se>
35 * test_nist2.in: Print that this is version 2 of the tests
37 * test_nist.in: Drop printing of $id.
39 * hx509.h: Add HX509_VHN_F_ALLOW_NO_MATCH.
43 * cert.c: make work the doxygen.
45 * name.c: fix doxygen compiling.
47 * Makefile.am: add doxygen.c
49 * doxygen.c: Add doxygen main page.
51 * cert.c: Add doxygen.
53 * revoke.c (_hx509_revoke_ref): new function.
55 2007-11-16 Love Hörnquist Åstrand <lha@it.su.se>
57 * ks_keychain.c: Check if SecKeyGetCSPHandle needs prototype.
59 2007-08-16 Love Hörnquist Åstrand <lha@it.su.se>
61 * data/nist-data: Make work on case senstive filesystems too.
63 2007-08-09 Love Hörnquist Åstrand <lha@it.su.se>
65 * cert.c: match rfc822 contrains better, provide better error
68 2007-08-08 Love Hörnquist Åstrand <lha@it.su.se>
70 * cert.c: "self-signed doesn't count" doesn't apply to trust
71 anchor certificate. make trust anchor check consistant.
73 * revoke.c: make compile.
75 * revoke.c (verify_crl): set error strings.
77 * revoke.c (verify_crl): handle with the signer is the
80 * cert.c: Fix NC, comment on how to use _hx509_check_key_usage.
82 2007-08-03 Love Hörnquist Åstrand <lha@it.su.se>
84 * test_nist2.in, Makefile, test/nist*: Add nist pkits tests.
86 * revoke.c: Update to use CERT_REVOKED error, shortcut out of OCSP
87 checking when OCSP reply is a revocation reply.
89 * hx509_err.et: Make CERT_REVOKED error OCSP/CRL agnostic.
91 * name.c (_hx509_Name_to_string): make printableString handle
92 space (0x20) diffrences as required by rfc3280.
94 * revoke.c: Search for the right issuer when looking for the
95 issuer of the CRL signer.
97 2007-08-02 Love Hörnquist Åstrand <lha@it.su.se>
99 * revoke.c: Handle CRL signing certificate better, try to not
100 revalidate invalid CRLs over and over.
102 2007-08-01 Love Hörnquist Åstrand <lha@it.su.se>
104 * cms.c: remove stale comment.
106 * test_nist.in: Unpack PKITS_data.zip and run tests.
108 * test_nist_cert.in: Adapt to new nist pkits framework.
110 * test_nist_pkcs12.in: Adapt to new nist pkits framework.
112 * Makefile.am: clean PKITS_data
114 2007-07-16 Love Hörnquist Åstrand <lha@it.su.se>
116 * Makefile.am: Add version-script.map to EXTRA_DIST
118 2007-07-12 Love Hörnquist Åstrand <lha@it.su.se>
120 * Makefile.am: Add depenency on asn1_compile for asn1 built files.
122 2007-07-10 Love Hörnquist Åstrand <lha@it.su.se>
124 * peer.c: update (c), indent.
126 * Makefile.am: New library version.
128 2007-06-28 Love Hörnquist Åstrand <lha@it.su.se>
130 * ks_p11.c: Add sha2 types.
132 * ref/pkcs11.h: Sync with scute.
134 * ref/pkcs11.h: Add sha2 CKM's.
136 * print.c: Print authorityInfoAccess.
138 * cert.c: Rename proxyCertInfo oid.
140 * ca.c: Rename proxyCertInfo oid.
142 * print.c: Rename proxyCertInfo oid.
144 2007-06-26 Love Hörnquist Åstrand <lha@it.su.se>
146 * test_ca.in: Adapt to new request handling.
148 * req.c: Allow export some of the request parameters.
150 * hxtool-commands.in: Adapt to new request handling.
152 * hxtool.c: Adapt to new request handling.
154 * test_req.in: Adapt to new request handling.
156 * version-script.map: Add initialize_hx_error_table_r.
158 * req.c: Move _hx509_request_print here.
160 * hxtool.c: use _hx509_request_print
162 * version-script.map: Export more crap^W semiprivate functions.
164 * hxtool.c: don't _hx509_abort
166 * version-script.map: add missing ;
168 2007-06-25 Love Hörnquist Åstrand <lha@it.su.se>
170 * cms.c: Use hx509_crypto_random_iv.
172 * crypto.c: Split out the iv creation from hx509_crypto_encrypt
173 since _hx509_pbe_encrypt needs to use the iv from the s2k
176 * test_cert.in: Test PEM and DER FILE writing functionallity.
178 * ks_file.c: Add writing DER certificates.
180 * hxtool.c: Update to new hx509_pem_write().
182 * test_cms.in: test creation of PEM signeddata.
184 * hx509.h: PEM struct/function declarations.
186 * ks_file.c: Use PEM encoding/decoding functions.
188 * file.c: PEM encode/decoding functions.
190 * ks_file.c: Use hx509_pem_write.
192 * version-script.map: Export some semi-private functions.
194 * hxtool.c: Enable writing out signed data as a pem attachment.
196 * hxtool-commands.in (cms-create-signed): add --pem
198 * file.c (hx509_pem_write): Add.
200 * test_ca.in: Issue and test null subject cert.
202 * cert.c: Match is first component is in a CN=.
204 * test_ca.in: Test hostname if first CN.
206 * Makefile.am: Add version script.
208 * version-script.map: Limited exported symbols.
210 * test_ca.in: test --hostname.
212 * test_chain.in: test max-depth
214 * hx509.h: fixate HX509_HN_HOSTNAME at 0.
216 * hxtool-commands.in: add --hostname add --max-depth
218 * cert.c: Verify hostname and max-depth.
220 * hxtool.c: Verify hostname and test max-depth.
222 2007-06-24 Love Hörnquist Åstrand <lha@it.su.se>
224 * test_cms.in: Test --id-by-name.
226 * hxtool-commands.in: add cms-create-sd --id-by-name
228 * hxtool.c: Use HX509_CMS_SIGATURE_ID_NAME.
230 * cms.c: Implement and use HX509_CMS_SIGATURE_ID_NAME.
232 * hx509.h: Add HX509_CMS_SIGATURE_ID_NAME, use subject name for
233 CMS.Identifier. hx509_hostname_type: add hostname type for
236 * cert.c (match_general_name): more strict rfc822Name matching.
237 (hx509_verify_hostname): add hostname type for matching.
239 2007-06-19 Love Hörnquist Åstrand <lha@it.su.se>
241 * hxtool.c: Make compile again.
243 * hxtool.c: Added peap-server for to make windows peap clients
246 * hxtool.c: Unify parse_oid code.
248 * hxtool.c: Implement --content-type.
250 * hxtool-commands.in: Add content-type.
252 * test_cert.in: more cert and keyset tests.
254 2007-06-18 Love Hörnquist Åstrand <lha@it.su.se>
256 * revoke.c: Avoid stomping on NULL.
258 * revoke.c: Avoid reusing i.
260 * cert.c: Provide __attribute__ for _hx509_abort.
262 * ks_file.c: Fail if not finding iv.
264 * keyset.c: Avoid useing freed memory.
266 * crypto.c: Free memory in failure case.
268 * crypto.c: Free memory in failure case.
270 2007-06-12 Love Hörnquist Åstrand <lha@it.su.se>
272 * *.c: Add hx509_cert_init_data and use everywhere
274 * hx_locl.h: Now that KEYCHAIN:system-anchors is fast again, use
277 * ks_keychain.c: Implement trust anchor support with
278 SecTrustCopyAnchorCertificates.
280 * keyset.c: Set ref to 1 for the new object.
282 * cert.c: Fix logic for allow_default_trust_anchors
284 * keyset.c: Add refcounting to keystores.
286 * cert.c: Change logic for default trust anchors, make it be
287 either default trust anchor, the user supplied, or non at all.
289 2007-06-08 Love Hörnquist Åstrand <lha@it.su.se>
291 * Makefile.am: Add data/j.pem.
293 * Makefile.am: Add test_windows.in.
295 2007-06-06 Love Hörnquist Åstrand <lha@it.su.se>
297 * ks_keychain.c: rename functions, leaks less memory and more
300 * test_cms.in: Test cms peer-alg.
302 * crypto.c (rsa_create_signature): make oid_id_pkcs1_rsaEncryption
303 mean rsa-with-sha1 but oid oid_id_pkcs1_rsaEncryption in algorithm
304 field. XXX should probably use another algorithmIdentifier for
307 * peer.c: Make free function return void.
309 * cms.c (hx509_cms_create_signed_1): Use hx509_peer_info to select
310 the signature algorithm too.
312 * hxtool-commands.in: Add cms-create-sd --peer-alg.
314 * req.c: Use _hx509_crypto_default_sig_alg.
316 * test_windows.in: Create crl, because everyone needs one.
318 * Makefile.am: add wcrl.crl
320 2007-06-05 Love Hörnquist Åstrand <lha@it.su.se>
322 * hx_locl.h: Disable KEYCHAIN for now, its slow.
324 * cms.c: When we are not using pkcs7-data, avoid seing
325 signedAttributes since some clients get upset by that (pkcs7 based
326 or just plain broken).
328 * ks_keychain.c: Provide rsa signatures.
330 * ks_keychain.c: Limit the searches to the selected keychain.
332 * ks_keychain.c: include -framework Security specific header files
335 * ks_keychain.c: Find and attach private key (does not provide
336 operations yet though).
338 * ks_p11.c: Prefix rsa method with p11_
340 * ks_keychain.c: Allow opening a specific chain, making "system"
341 special and be the system X509Anchors file. By not specifing any
342 keychain ("KEYCHAIN:"), all keychains are probed.
344 2007-06-04 Love Hörnquist Åstrand <lha@it.su.se>
346 * hxtool.c (verify): Friendlier error message.
348 * cert.c: Read in and use default trust anchors if they exists.
350 * hx_locl.h: Add concept of default_trust_anchors.
352 * ks_keychain.c: Remove err(), remove extra empty comment, fix
355 * error.c (hx509_get_error_string): if the error code is not the
356 one we expect, punt and use the default com_err/strerror string
359 * keyset.c (hx509_certs_merge): its ok to merge in the NULL set of
362 * test_windows.in: Fix status string.
364 * ks_p12.c (store_func): free whole CertBag, not just the data
367 * print.c: Check that the self-signed cert is really self-signed.
369 * print.c: Use selfsigned for CRL DP whine, tell if its a
372 * print.c: Whine if its a non CA/proxy and doesn't have CRL DP.
374 * ca.c: Add cRLSign to CA certs.
376 * cert.c: Register NULL and KEYCHAIN.
378 * ks_null.c: register the NULL keystore.
380 * Makefile.am: Add ks_keychain.c and related libs.
382 * test_crypto.in: Print certificate with utf8.
384 * print.c: Leak less memory.
386 * hxtool.c: Leak less memory.
388 * print.c: Leak less memory, use functions that does same but
391 * name.c (quote_string): don't sign extend the (signed) char to
392 avoid printing too much, add an assert to check that we didn't
395 * name.c: Use right element out of the CHOICE for printableString
398 * ks_keychain.c: Certificate only KeyChain backend.
400 * name.c: Reset name before parsing it.
402 2007-06-03 Love Hörnquist Åstrand <lha@it.su.se>
404 * revoke.c (hx509_crl_*): fix sizeof() mistakes to fix memory
407 * hxtool.c: Add lifetime to crls.
409 * hxtool-commands.in: Add lifetime to crls.
411 * revoke.c: Add lifetime to crls.
413 * test_ca.in: More crl checks.
415 * revoke.c: Add revoking certs.
417 * hxtool-commands.in: argument is certificates.. for crl-sign
419 * hxtool.c (certificate_copy): free lock
421 * revoke.c: Fix hx509_set_error_string calls, add
422 hx509_crl_add_revoked_certs(), implement hx509_crl_{alloc,free}.
424 * hxtool.c (crl_sign): free lock
426 * cert.c (hx509_context_free): free querystat
428 2007-06-02 Love Hörnquist Åstrand <lha@it.su.se>
430 * test_chain.in: test ocsp-verify
432 * revoke.c (hx509_ocsp_verify): explain what its useful for and
433 provide sane error message.
435 * hx509_err.et: New error code, CERT_NOT_IN_OCSP
437 * hxtool.c: New command ocsp-verify, check if ocsp contains all
438 certs and are valid (exist and non expired).
440 * hxtool-commands.in: New command ocsp-verify.
442 2007-06-01 Love Hörnquist Åstrand <lha@it.su.se>
444 * test_ca.in: Create crl and verify that is works.
446 * hxtool.c: Sign CRL command.
448 * hx509.h: Add hx509_crl.
450 * hxtool-commands.in: Add crl-sign commands.
452 * revoke.c: Support to generate an empty CRL.
454 * tst-crypto-select2: Switched default types.
456 * tst-crypto-select1: Switched default types.
458 * ca.c: Use default AlgorithmIdentifier.
460 * cms.c: Use default AlgorithmIdentifier.
462 * crypto.c: Provide default AlgorithmIdentifier and use them.
464 * hx_locl.h: Provide default AlgorithmIdentifier.
466 * keyset.c (hx509_certs_find): collects stats for queries.
468 * cert.c: Sort and print more info.
470 * hx_locl.h: Add querystat to hx509_context.
472 * test_*.in: sprinle stat saveing
474 * Makefile.am: Add stat and objdir.
476 * collector.c (_hx509_collector_alloc): return error code instead
479 * hxtool.c: Add statistic hook.
481 * ks_file.c: Update _hx509_collector_alloc prototype.
483 * ks_p12.c: Update _hx509_collector_alloc prototype.
485 * ks_p11.c: Update _hx509_collector_alloc prototype.
487 * hxtool-commands.in: Add statistics hook.
489 * cert.c: Statistics printing.
491 * ks_p12.c: plug memory leak
493 * ca.c (hx509_ca_tbs_add_crl_dp_uri): plug memory leak
495 2007-05-31 Love Hörnquist Åstrand <lha@it.su.se>
497 * print.c: print utf8 type SAN's
499 * Makefile.am: Fix windows client cert name.
501 * test_windows.in: Add crl-uri for the ee certs.
503 * print.c: Printf formating.
505 * ca.c: Add glue for adding CRL dps.
507 * test_ca.in: Readd the crl adding code, it works (somewhat) now.
509 * print.c: Fix printing of CRL DPnames (I hate IMPLICIT encoded
512 * hxtool-commands.in: make ca and alias of certificate-sign
514 2007-05-30 Love Hörnquist Åstrand <lha@it.su.se>
516 * crypto.c (hx509_crypto_select): copy AI to the right place.
518 * hxtool-commands.in: Add ca --ms-upn.
520 * hxtool.c: add --ms-upn and add more EKU's for pk-init client.
522 * ca.c: Add hx509_ca_tbs_add_san_ms_upn and refactor code.
524 * test_crypto.in: Resurect killed e.
526 * test_crypto.in: check for aes256-cbc
528 * tst-crypto-select7: check for aes256-cbc
530 * test_windows.in: test windows stuff
532 * hxtool.c: add ca --domain-controller option, add secret key
535 * ca.c: Add hx509_ca_tbs_set_domaincontroller.
537 * hxtool-commands.in: add ca --domain-controller
539 * hxtool.c: hook for testing secrety key algs
541 * crypto.c: Add selection code for secret key crypto.
543 * hx509.h: Add HX509_SELECT_SECRET_ENC.
545 2007-05-13 Love Hörnquist Åstrand <lha@it.su.se>
547 * ks_p11.c: add more mechtypes
549 2007-05-10 Love Hörnquist Åstrand <lha@it.su.se>
553 * hxtool-commands.in: add test-crypto command
555 * hxtool.c: test crypto command
557 * cms.c (hx509_cms_create_signed_1): if no eContentType is given,
560 * print.c: add Netscape cert comment
562 * crypto.c: Try both the empty password and the NULL
563 password (nothing vs the octet string \x00\x00).
565 * print.c: Add some US Fed PKI oids.
567 * ks_p11.c: Add some more hashes.
569 2007-04-24 Love Hörnquist Åstrand <lha@it.su.se>
571 * hxtool.c (crypto_select): stop memory leak
573 2007-04-19 Love Hörnquist Åstrand <lha@it.su.se>
575 * peer.c (hx509_peer_info_free): free memory used too
577 * hxtool.c (crypto_select): only free peer if it was used.
579 2007-04-18 Love Hörnquist Åstrand <lha@it.su.se>
581 * hxtool.c: free template
583 * ks_mem.c (mem_free): free key array too
585 * hxtool.c: free private key and tbs
587 * hxtool.c (hxtool_ca): free signer
589 * hxtool.c (crypto_available): free peer too.
591 * ca.c (get_AuthorityKeyIdentifier): leak less memory
593 * hxtool.c (hxtool_ca): free SPKI
595 * hxtool.c (hxtool_ca): free cert
597 * ks_mem.c (mem_getkeys): allocate one more the we have elements
598 so its possible to store the NULL pointer at the end.
600 2007-04-16 Love Hörnquist Åstrand <lha@it.su.se>
602 * Makefile.am: CLEANFILES += cert-null.pem cert-sub-ca2.pem
604 2007-02-05 Love Hörnquist Åstrand <lha@it.su.se>
606 * ca.c: Disable CRLDistributionPoints for now, its IMPLICIT code
609 * print.c: Add some more \n's.
611 2007-02-03 Love Hörnquist Åstrand <lha@it.su.se>
613 * file.c: Allow mapping using heim_octet_string.
615 * hxtool.c: Add options to generate detached signatures.
617 * cms.c: Add flags to generate detached signatures.
619 * hx509.h: Flag to generate detached signatures.
621 * test_cms.in: Support detached sigatures.
623 * name.c (hx509_general_name_unparse): unparse the other
624 GeneralName nametypes.
626 * print.c: Use less printf. Use hx509_general_name_unparse.
628 * cert.c: Fix printing and plug leak-on-error.
630 2007-01-31 Love Hörnquist Åstrand <lha@it.su.se>
632 * test_ca.in: Add test for ca --crl-uri.
634 * hxtool.c: Add ca --crl-uri.
636 * hxtool-commands.in: add ca --crl-uri
638 * ca.c: Code to set CRLDistributionPoints in certificates.
640 * print.c: Check CRLDistributionPointNames.
642 * name.c (hx509_general_name_unparse): function for unparsing
643 GeneralName, only supports GeneralName.URI
645 * cert.c (is_proxy_cert): free info if we wont return it.
647 2007-01-30 Love Hörnquist Åstrand <lha@it.su.se>
649 * hxtool.c: Try to help how to use this command.
651 2007-01-21 Love Hörnquist Åstrand <lha@it.su.se>
653 * switch to sha256 as default digest for signing
655 2007-01-20 Love Hörnquist Åstrand <lha@it.su.se>
657 * test_ca.in: Really test sub-ca code, add basic constraints tests
659 2007-01-17 Love Hörnquist Åstrand <lha@it.su.se>
661 * Makefile.am: Fix makefile problem.
663 2007-01-16 Love Hörnquist Åstrand <lha@it.su.se>
665 * hxtool.c: Set num of bits before we generate the key.
667 2007-01-15 Love Hörnquist Åstrand <lha@it.su.se>
669 * cms.c (hx509_cms_create_signed_1): use hx509_cert_binary
671 * ks_p12.c (store_func): use hx509_cert_binary
673 * ks_file.c (store_func): use hx509_cert_binary
675 * cert.c (hx509_cert_binary): return binary encoded
676 certificate (DER format)
678 2007-01-14 Love Hörnquist Åstrand <lha@it.su.se>
680 * ca.c (hx509_ca_tbs_subject_expand): new function.
682 * name.c (hx509_name_expand): if env is NULL, return directly
684 * test_ca.in: test template handling
686 * hx509.h: Add template flags.
688 * Makefile.am: clean out new files
690 * hxtool.c: Add certificate template processing, fix hx509_err
693 * hxtool-commands.in: Add certificate template processing.
695 * ca.c: Add certificate template processing. Fix return messages
696 from hx509_ca_tbs_add_eku.
698 * cert.c: Export more stuff from certificate.
700 2007-01-13 Love Hörnquist Åstrand <lha@it.su.se>
704 * ca.c: (hx509_ca_tbs_add_eku): filter out dups.
706 * hxtool.c: Add type email and add email eku when using option
709 * Makefile.am: add env.c
711 * name.c: Remove abort, add error handling.
713 * test_name.c: test name expansion
715 * name.c: add hx509_name_expand
717 * env.c: key-value pair help functions
719 2007-01-12 Love Hörnquist Åstrand <lha@it.su.se>
721 * ca.c: Don't issue certs with subject DN that is NULL and have no
724 * print.c: Fix previous test.
726 * print.c: Check there is a SAN if subject DN is NULL.
728 * test_ca.in: test email, null subject dn
730 * hxtool.c: Allow setting parameters to private key generation.
732 * hx_locl.h: Allow setting parameters to private key generation.
734 * crypto.c: Allow setting parameters to private key generation.
736 * hxtool.c (eval_types): add jid if user gave one
738 * hxtool-commands.in (certificate-sign): add --jid
740 * ca.c (hx509_ca_tbs_add_san_jid): Allow adding
741 id-pkix-on-xmppAddr OtherName.
743 * print.c: Print id-pkix-on-xmppAddr OtherName.
745 2007-01-11 Love Hörnquist Åstrand <lha@it.su.se>
747 * no random, no RSA/DH tests
749 * hxtool.c (info): print status of random generator
751 * Makefile.am: remove files created by tests
759 * hx_locl.h: constify
765 * hx_locl.h: make printinfo char * argument const.
767 * cms.c: move _hx509_set_digest_alg from cms.c to crypto.c since
770 * crypto.c: remove no longer used stuff, move set_digest_alg here
771 from cms.c since its only used here.
773 * Makefile.am: add data/test-nopw.p12 to EXTRA_DIST
775 2007-01-10 Love Hörnquist Åstrand <lha@it.su.se>
777 * print.c: BasicConstraints vs criticality bit is complicated and
778 not really possible to evaluate on its own, silly RFC3280.
780 * ca.c: Make basicConstraints critical if this is a CA.
782 * print.c: fix the version vs extension test
784 * print.c: More validation checks.
786 * name.c (hx509_name_cmp): add
788 2007-01-09 Love Hörnquist Åstrand <lha@it.su.se>
790 * ks_p11.c (collect_private_key): Missing CKA_MODULUS is ok
791 too (XXX why should these be fetched given they are not used).
793 * test_ca.in: rename all files to PEM files, since that is what
796 * hxtool.c: copy out the key with the self signed CA cert
798 * Factor out private key operation out of the signing, operations,
799 support import, export, and generation of private keys. Add
800 support for writing PEM and PKCS12 files with private keys in them.
802 * data/gen-req.sh: Generate a no password pkcs12 file.
804 2007-01-08 Love Hörnquist Åstrand <lha@it.su.se>
806 * cms.c: Check for internal ASN1 encoder error.
808 2007-01-05 Love Hörnquist Åstrand <lha@it.su.se>
810 * Makefile.am: Drop most of the pkcs11 files.
812 * test_ca.in: test reissueing ca certificate (xxx time
815 * hxtool.c: Allow setting serialNumber (needed for reissuing
816 certificates) Change --key argument to --out-key.
818 * hxtool-commands.in (issue-certificate): Allow setting
819 serialNumber (needed for reissuing certificates), Change --key
820 argument to --out-key.
822 * ref: Replace with Marcus Brinkmann of g10 Code GmbH pkcs11
823 headerfile that is compatible with GPL (file taken from scute)
825 2007-01-04 Love Hörnquist Åstrand <lha@it.su.se>
827 * test_ca.in: Test to generate key and use them.
829 * hxtool.c: handle other keys the pkcs10 requested keys
831 * hxtool-commands.in: add generate key commands
833 * req.c (_hx509_request_to_pkcs10): PKCS10 needs to have a subject
835 * hxtool-commands.in: Spelling.
837 * ca.c (hx509_ca_tbs_set_proxy): allow negative pathLenConstraint
840 * ks_file.c: Try all formats on the binary file before giving up,
841 this way we can handle binary rsa keys too.
843 * data/key2.der: new test key
845 2007-01-04 David Love <fx@gnu.org>
847 * Makefile.am (hxtool_LDADD): Add libasn1.la
849 * hxtool.c (pcert_verify): Fix format string.
851 2006-12-31 Love Hörnquist Åstrand <lha@it.su.se>
853 * hxtool.c: Allow setting path length
855 * cert.c: Fix test for proxy certs chain length, it was too
860 * data/openssl.cnf: (proxy_cert) make length 0
862 * test_ca.in: Issue a long living cert.
864 * hxtool.c: add --lifetime to ca command.
866 * hxtool-commands.in: add --lifetime to ca command.
868 * ca.c: allow setting notBefore and notAfter.
870 * test_ca.in: Test generation of proxy certificates.
872 * ca.c: Allow generation of proxy certificates, always include
873 BasicConstraints, fix error codes.
875 * hxtool.c: Allow generation of proxy certificates.
877 * test_name.c: make hx509_parse_name take a hx509_context.
879 * name.c: Split building RDN to a separate function.
881 2006-12-30 Love Hörnquist Åstrand <lha@it.su.se>
883 * Makefile.am: clean test_ca files.
885 * test_ca.in: test issuing self-signed and CA certificates.
887 * hxtool.c: Add bits to allow issuing self-signed and CA
890 * hxtool-commands.in: Add bits to allow issuing self-signed and CA
893 * ca.c: Add bits to allow issuing CA certificates.
895 * revoke.c: use new OCSPSigning.
897 * ca.c: Add Subject Key Identifier.
899 * ca.c: Add Authority Key Identifier.
901 * cert.c: Locally export _hx509_find_extension_subject_key_id.
902 Handle AuthorityKeyIdentifier where only authorityCertSerialNumber
903 and authorityCertSerialNumber is set.
905 * hxtool-commands.in: Add dnsname and rfc822 SANs.
907 * test_ca.in: Test dnsname and rfc822 SANs.
909 * ca.c: Add dnsname and rfc822 SANs.
911 * hxtool.c: Add dnsname and rfc822 SANs.
913 * test_ca.in: test adding eku, ku and san to the
914 certificate (https and pk-init)
916 * hxtool.c: Add eku, ku and san to the certificate.
918 * ca.c: Add eku, ku and san to the certificate.
920 * hxtool-commands.in: Add --type and --pk-init-principal
922 * ocsp.asn1: remove id-kp-OCSPSigning, its in rfc2459.asn1 now
924 2006-12-29 Love Hörnquist Åstrand <lha@it.su.se>
926 * ca.c: Add KeyUsage extension.
928 * Makefile.am: add ca.c, add sign-certificate tests.
930 * crypto.c: Add _hx509_create_signature_bitstring.
932 * hxtool-commands.in: Add the sign-certificate tool.
934 * hxtool.c: Add the sign-certificate tool.
936 * cert.c: Add HX509_QUERY_OPTION_KU_KEYCERTSIGN.
938 * hx509.h: Add hx509_ca_tbs and HX509_QUERY_OPTION_KU_KEYCERTSIGN.
940 * test_ca.in: Basic test of generating a pkcs10 request, signing
941 it and verifying the chain.
943 * ca.c: Naive certificate signer.
945 2006-12-28 Love Hörnquist Åstrand <lha@it.su.se>
947 * hxtool.c: add hxtool_hex
949 2006-12-22 Love Hörnquist Åstrand <lha@it.su.se>
951 * Makefile.am: use top_builddir for libasn1.la
953 2006-12-11 Love Hörnquist Åstrand <lha@it.su.se>
955 * hxtool.c (print_certificate): print serial number.
957 * name.c (no): add S=stateOrProvinceName
959 2006-12-09 Love Hörnquist Åstrand <lha@it.su.se>
961 * crypto.c (_hx509_private_key_assign_rsa): set a default sig alg
963 * ks_file.c (try_decrypt): pass down AlgorithmIdentifier that key
964 uses to do sigatures so there is no need to hardcode RSA into this
967 2006-12-08 Love Hörnquist Åstrand <lha@it.su.se>
969 * ks_file.c: Pass filename to the parse functions and use it in
972 * test_chain.in: test proxy cert (third level)
974 * hx509_err.et: fix errorstring for PROXY_CERT_NAME_WRONG
978 * Makefile.am: EXTRA_DIST: add
979 data/proxy10-child-child-test.{key,crt}
981 * data/gen-req.sh: Fix names and restrictions on the proxy
984 * cert.c: Clairfy and make proxy cert handling work for multiple
985 levels, before it was too restrictive. More helpful error message.
987 2006-12-07 Love Hörnquist Åstrand <lha@it.su.se>
989 * cert.c (check_key_usage): tell what keyusages are missing
991 * print.c: Split OtherName printing code to a oid lookup and print
994 * print.c (Time2string): print hour as hour not min
996 * Makefile.am: CLEANFILES += test
998 2006-12-06 Love Hörnquist Åstrand <lha@it.su.se>
1000 * Makefile.am (EXTRA_DIST): add data/pkinit-proxy* files
1002 * Makefile.am (EXTRA_DIST): add tst-crypto* files
1004 * cert.c (hx509_query_match_issuer_serial): make a copy of the
1007 * cert.c (hx509_query_match_issuer_serial): allow matching on
1008 issuer and serial num
1010 * cert.c (_hx509_calculate_path): add flag to allow leaving out
1013 * cms.c (hx509_cms_create_signed_1): when building the path, omit
1016 * crypto.c (rsa_create_signature): Abort when signature is longer,
1019 * cms.c: Provide time to _hx509_calculate_path so we don't send no
1020 longer valid certs to our peer.
1022 * cert.c (find_parent): when checking for certs and its not a
1023 trust anchor, require time be in range.
1024 (_hx509_query_match_cert): Add time validity-testing to query mask
1026 * hx_locl.h: add time validity-testing to query mask
1028 * test_cms.in: Tests for CMS SignedData with incomplete chain from
1031 2006-11-28 Love Hörnquist Åstrand <lha@it.su.se>
1033 * cms.c (hx509_cms_verify_signed): specify what signature we
1036 * Makefile.am: Depend on LIB_com_err for AIX.
1038 * keyset.c: Remove anther strndup that causes AIX to fall over.
1040 * cert.c: Don't check the trust anchors expiration time since they
1041 are transported out of band, from RFC3820.
1043 * cms.c: sprinkle more error strings
1045 * crypto.c: sprinkle more error strings
1047 * hxtool.c: use unsigned int as counter to fit better with the
1050 * crypto.c: use unsigned int as counter to fit better with the
1053 2006-11-27 Love Hörnquist Åstrand <lha@it.su.se>
1055 * cms.c: Remove trailing white space.
1057 * crypto.c: rewrite comment to make more sense
1059 * crypto.c (hx509_crypto_select): check sig_algs[j]->key_oid
1061 * hxtool-commands.in (crypto-available): add --type
1063 * crypto.c (hx509_crypto_available): let alg pass if its keyless
1065 * hxtool-commands.in: Expand crypto-select
1067 * cms.c: Rename hx509_select to hx509_crypto_select.
1069 * hxtool-commands.in: Add crypto-select and crypto-available.
1071 * hxtool.c: Add crypto-select and crypto-available.
1073 * crypto.c (hx509_crypto_available): use right index.
1074 (hx509_crypto_free_algs): new function
1076 * crypto.c (hx509_crypto_select): improve
1077 (hx509_crypto_available): new function
1079 2006-11-26 Love Hörnquist Åstrand <lha@it.su.se>
1081 * cert.c: Sprinkle more error string and hx509_contexts.
1083 * cms.c: Sprinkle more error strings.
1085 * crypto.c: Sprinkle error string and hx509_contexts.
1087 * crypto.c: Add some more comments about how this works.
1089 * crypto.c (hx509_select): new function.
1091 * Makefile.am: add peer.c
1093 * hxtool.c: Update hx509_cms_create_signed_1.
1095 * hx_locl.h: add struct hx509_peer_info
1097 * peer.c: Allow selection of digest/sig-alg
1099 * cms.c: Allow selection of a better digest using hx509_peer_info.
1101 * revoke.c: Handle that _hx509_verify_signature takes a context.
1103 * cert.c: Handle that _hx509_verify_signature takes a context.
1105 2006-11-25 Love Hörnquist Åstrand <lha@it.su.se>
1107 * cms.c: Sprinkle error strings.
1109 * crypto.c: Sprinkle context and error strings.
1111 2006-11-24 Love Hörnquist Åstrand <lha@it.su.se>
1113 * name.c: Handle printing and parsing raw oids in name.
1115 2006-11-23 Love Hörnquist Åstrand <lha@it.su.se>
1117 * cert.c (_hx509_calculate_path): allow to calculate optimistic
1118 path when we don't know the trust anchors, just follow the chain
1119 upward until we no longer find a parent or we hit the max limit.
1121 * cms.c (hx509_cms_create_signed_1): provide a best effort path to
1122 the trust anchors to be stored in the SignedData packet, if find
1123 parents until trust anchor or max length.
1127 * data/gen-req.sh: Build pk-init proxy cert.
1129 2006-11-16 Love Hörnquist Åstrand <lha@it.su.se>
1131 * error.c (hx509_get_error_string): Put ", " between strings in
1134 2006-11-13 Love Hörnquist Åstrand <lha@it.su.se>
1136 * data/openssl.cnf: Change realm to TEST.H5L.SE
1138 2006-11-07 Love Hörnquist Åstrand <lha@it.su.se>
1140 * revoke.c: Sprinkle error strings.
1142 2006-11-04 Love Hörnquist Åstrand <lha@it.su.se>
1144 * hx_locl.h: add context variable to cmp function.
1146 * cert.c (hx509_query_match_cmp_func): allow setting the match
1149 2006-10-24 Love Hörnquist Åstrand <lha@it.su.se>
1151 * ks_p11.c: Return less EINVAL.
1153 * hx509_err.et: add more pkcs11 errors
1155 * hx509_err.et: more error-codes
1157 * revoke.c: Return less EINVAL.
1159 * ks_dir.c: sprinkel more hx509_set_error_string
1161 * ks_file.c: Return less EINVAL.
1163 * hxtool.c: Pass in context to _hx509_parse_private_key.
1165 * ks_file.c: Sprinkle more hx509_context so we can return propper
1168 * hx509_err.et: add HX509_PARSING_KEY_FAILED
1170 * crypto.c: Sprinkle more hx509_context so we can return propper
1173 * collector.c: No more EINVAL.
1175 * hx509_err.et: add HX509_LOCAL_ATTRIBUTE_MISSING
1177 * cert.c (hx509_cert_get_base_subject): one less EINVAL
1178 (_hx509_cert_private_decrypt): one less EINVAL
1180 2006-10-22 Love Hörnquist Åstrand <lha@it.su.se>
1182 * collector.c: indent
1184 * hxtool.c: Try to not leak memory.
1186 * req.c: clean memory before free
1188 * crypto.c (_hx509_private_key2SPKI): indent
1190 * req.c: Try to not leak memory.
1192 2006-10-21 Love Hörnquist Åstrand <lha@it.su.se>
1194 * test_crypto.in: Read 50 kilobyte random data
1196 * revoke.c: Try to not leak memory.
1198 * hxtool.c: Try to not leak memory.
1200 * crypto.c (hx509_crypto_destroy): free oid.
1202 * error.c: Clean error string on failure just to make sure.
1204 * cms.c: Try to not leak memory (again).
1206 * hxtool.c: use a sensable content type
1208 * cms.c: Try harder to free certificate.
1210 2006-10-20 Love Hörnquist Åstrand <lha@it.su.se>
1212 * Makefile.am: Add make check data.
1214 2006-10-19 Love Hörnquist Åstrand <lha@it.su.se>
1216 * ks_p11.c (p11_list_keys): make element of search_data[0]
1217 constants and set them later
1219 * Makefile.am: Add more files.
1221 2006-10-17 Love Hörnquist Åstrand <lha@it.su.se>
1223 * ks_file.c: set ret, remember to free ivdata
1225 2006-10-16 Love Hörnquist Åstrand <lha@it.su.se>
1227 * hx_locl.h: Include <parse_bytes.h>.
1229 * test_crypto.in: Test random-data.
1231 * hxtool.c: RAND_bytes() return 1 for cryptographic strong data,
1234 * Makefile.am: clean random-data
1236 * hxtool.c: Add random-data command, use sl_slc_help.
1238 * hxtool-commands.in: Add random-data.
1240 * ks_p12.c: Remember to release certs.
1242 * ks_p11.c: Remember to release certs.
1244 2006-10-14 Love Hörnquist Åstrand <lha@it.su.se>
1246 * prefix der primitives with der_
1248 * lock.c: Match the prompt type PROMPT exact.
1250 * hx_locl.h: Drop heim_any.h
1252 2006-10-11 Love Hörnquist Åstrand <lha@it.su.se>
1254 * ks_p11.c (p11_release_module): j needs to be used as inter loop
1255 index. From Douglas Engert.
1257 * ks_file.c (parse_rsa_private_key): try all passwords and
1260 2006-10-10 Love Hörnquist Åstrand <lha@it.su.se>
1262 * test_*.in: Parameterise the invocation of hxtool, so we can make
1263 it run under TESTS_ENVIRONMENT. From Andrew Bartlett
1265 2006-10-08 Love Hörnquist Åstrand <lha@it.su.se>
1267 * test_crypto.in: Put all test stuck at 2006-09-25 since all their
1268 chains where valied then.
1270 * hxtool.c: Implement --time= option.
1272 * hxtool-commands.in: Add option time.
1274 * Makefile.am: test_name is a PROGRAM_TESTS
1276 * ks_p11.c: Return HX509_PKCS11_NO_SLOT when there are no slots
1277 and HX509_PKCS11_NO_TOKEN when there are no token. For use in PAM
1278 modules that want to detect when to use smartcard login and when
1279 not to. Patched based on code from Douglas Engert.
1281 * hx509_err.et: Add new pkcs11 related errors in a new section:
1282 keystore related error. Patched based on code from Douglas
1285 2006-10-07 Love Hörnquist Åstrand <lha@it.su.se>
1287 * Makefile.am: Make depenency for slc built files just like
1290 * cert.c: Add all openssl algs and init asn1 et
1292 2006-10-06 Love Hörnquist Åstrand <lha@it.su.se>
1294 * ks_file.c (parse_rsa_private_key): free type earlier.
1296 * ks_file.c (parse_rsa_private_key): free type after use
1298 * name.c (_hx509_Name_to_string): remove dup const
1300 2006-10-02 Love Hörnquist Åstrand <lha@it.su.se>
1302 * Makefile.am: Add more libs to libhx509
1304 2006-10-01 Love Hörnquist Åstrand <lha@it.su.se>
1306 * ks_p11.c: Fix double free's, NULL ptr de-reference, and conform
1307 better to pkcs11. From Douglas Engert.
1309 * ref: remove ^M, it breaks solaris 10s cc. From Harald Barth
1311 2006-09-19 Love Hörnquist Åstrand <lha@it.su.se>
1313 * test_crypto.in: Bleichenbacher bad cert from Ralf-Philipp
1314 Weinmann and Andrew Pyshkin, pad right.
1316 * data: starfield test root cert and Ralf-Philipp and Andreis
1317 correctly padded bad cert
1319 2006-09-15 Love Hörnquist Åstrand <lha@it.su.se>
1321 * test_crypto.in: Add test for yutaka certs.
1323 * cert.c: Add a strict rfc3280 verification flag. rfc3280 requires
1324 certificates to have KeyUsage.keyCertSign if they are to be used
1325 for signing of certificates, but the step in the verifiation is
1328 * hxtool.c: Improve printing and error reporting.
1330 2006-09-13 Love Hörnquist Åstrand <lha@it.su.se>
1332 * test_crypto.in,Makefile.am,data/bleichenbacher-{bad,good}.pem:
1333 test bleichenbacher from eay
1335 2006-09-12 Love Hörnquist Åstrand <lha@it.su.se>
1337 * hxtool.c: Make common function for all getarg_strings and
1338 hx509_certs_append commonly used.
1340 * cms.c: HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT is a negative
1341 flag, treat it was such.
1343 2006-09-11 Love Hörnquist Åstrand <lha@it.su.se>
1345 * req.c: Use the new add_GeneralNames function.
1347 * hx509.h: Add HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT.
1349 * ks_p12.c: Adapt to new signature of hx509_cms_unenvelope.
1351 * hxtool.c: Adapt to new signature of hx509_cms_unenvelope.
1353 * cms.c: Allow passing in encryptedContent and flag. Add new flag
1354 HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT.
1356 2006-09-08 Love Hörnquist Åstrand <lha@it.su.se>
1358 * ks_p11.c: cast void * to char * when using it for %s formating
1361 * name.c: New function _hx509_Name_to_string.
1363 2006-09-07 Love Hörnquist Åstrand <lha@it.su.se>
1365 * ks_file.c: Sprinkle error messages.
1367 * cms.c: Sprinkle even more error messages.
1369 * cms.c: Sprinkle some error messages.
1371 * cms.c (find_CMSIdentifier): only free string when we allocated
1374 * ks_p11.c: Don't build most of the pkcs11 module if there are no
1377 2006-09-06 Love Hörnquist Åstrand <lha@it.su.se>
1379 * cms.c (hx509_cms_unenvelope): try to save the error string from
1380 find_CMSIdentifier so we have one more bit of information what
1383 * hxtool.c: More pretty printing, make verify_signed return the
1384 error string from the library.
1386 * cms.c: Try returning what certificates failed to parse or be
1389 * ks_p11.c (p11_list_keys): fetch CKA_LABEL and use it to set the
1390 friendlyname for the certificate.
1392 2006-09-05 Love Hörnquist Åstrand <lha@it.su.se>
1394 * crypto.c: check that there are no extra bytes in the checksum
1395 and that the parameters are NULL or the NULL-type. All to avoid
1396 having excess data that can be used to fake the signature.
1398 * hxtool.c: print keyusage
1400 * print.c: add hx509_cert_keyusage_print, simplify oid printing
1402 * cert.c: add _hx509_cert_get_keyusage
1404 * ks_p11.c: keep one session around for the whole life of the keyset
1406 * test_query.in: tests more selection
1408 * hxtool.c: improve pretty printing in print and query
1410 * hxtool{.c,-commands.in}: add selection on KU and printing to query
1412 * test_cms.in: Add cms test for digitalSignature and
1413 keyEncipherment certs.
1415 * name.c (no): Add serialNumber
1417 * ks_p11.c (p11_get_session): return better error messages
1419 2006-09-04 Love Hörnquist Åstrand <lha@it.su.se>
1421 * ref: update to pkcs11 reference files 2.20
1423 * ks_p11.c: add more mechflags
1425 * name.c (no): add OU and sort
1427 * revoke.c: pass context to _hx509_create_signature
1429 * ks_p11.c (p11_printinfo): print proper plural s
1431 * ks_p11.c: save the mechs supported when initing the token, print
1434 * hx_locl.h: Include <parse_units.h>.
1436 * cms.c: pass context to _hx509_create_signature
1438 * req.c: pass context to _hx509_create_signature
1440 * keyset.c (hx509_certs_info): print information about the keyset.
1442 * hxtool.c (pcert_print) print keystore info when --info flag is
1445 * hxtool-commands.in: Add hxtool print --info.
1447 * test_query.in: Test hxtool print --info.
1449 * hx_locl.h (hx509_keyset_ops): add printinfo
1451 * crypto.c: Start to hang the private key operations of the
1452 private key, pass hx509_context to create_checksum.
1454 2006-05-29 Love Hörnquist Åstrand <lha@it.su.se>
1456 * ks_p11.c: Iterate over all slots, not just the first/selected
1459 2006-05-27 Love Hörnquist Åstrand <lha@it.su.se>
1461 * cert.c: Add release function for certifiates so backend knowns
1462 when its no longer used.
1464 * ks_p11.c: Add reference counting on certifiates, push out
1465 CK_SESSION_HANDLE from slot.
1467 * cms.c: sprinkle more hx509_clear_error_string
1469 2006-05-22 Love Hörnquist Åstrand <lha@it.su.se>
1471 * ks_p11.c: Sprinkle some hx509_set_error_strings
1473 2006-05-13 Love Hörnquist Åstrand <lha@it.su.se>
1475 * hxtool.c: Avoid shadowing.
1477 * revoke.c: Avoid shadowing.
1479 * ks_file.c: Avoid shadowing.
1481 * cert.c: Avoid shadowing.
1483 2006-05-12 Love Hörnquist Åstrand <lha@it.su.se>
1485 * lock.c (hx509_prompt_hidden): reshuffle to avoid gcc warning
1487 * hx509.h: Reshuffle the prompter types, remove the hidden field.
1489 * lock.c (hx509_prompt_hidden): return if the prompt should be
1492 * revoke.c (hx509_revoke_free): allow free of NULL.
1494 2006-05-11 Love Hörnquist Åstrand <lha@it.su.se>
1496 * ks_file.c (file_init): Avoid shadowing ret (and thus avoiding
1499 * ks_dir.c: Implement DIR: caches useing FILE: caches.
1501 * ks_p11.c: Catch more errors.
1503 2006-05-08 Love Hörnquist Åstrand <lha@it.su.se>
1505 * crypto.c (hx509_crypto_encrypt): free correctly in error
1506 path. From Andrew Bartlett.
1508 * crypto.c: If RAND_bytes fails, then we will attempt to
1509 double-free crypt->key.data. From Andrew Bartlett.
1511 2006-05-05 Love Hörnquist Åstrand <lha@it.su.se>
1513 * name.c: Rename u_intXX_t to uintXX_t
1515 2006-05-03 Love Hörnquist Åstrand <lha@it.su.se>
1517 * TODO: More to do about the about the PKCS11 code.
1519 * ks_p11.c: Use the prompter from the lock function.
1521 * lock.c: Deal with that hx509_prompt.reply is no longer a
1524 * hx509.h: Make hx509_prompt.reply not a pointer.
1526 2006-05-02 Love Hörnquist Åstrand <lha@it.su.se>
1528 * keyset.c: Sprinkle setting error strings.
1530 * crypto.c: Sprinkle setting error strings.
1532 * collector.c: Sprinkle setting error strings.
1534 * cms.c: Sprinkle setting error strings.
1536 2006-05-01 Love Hörnquist Åstrand <lha@it.su.se>
1538 * test_name.c: renamed one error code
1540 * name.c: renamed one error code
1542 * ks_p11.c: _hx509_set_cert_attribute changed signature
1544 * hxtool.c (pcert_print): use hx509_err so I can test it
1546 * error.c (hx509_set_error_stringv): clear errors on malloc
1549 * hx509_err.et: Add some more errors
1551 * cert.c: Sprinkle setting error strings.
1553 * cms.c: _hx509_path_append changed signature.
1555 * revoke.c: changed signature of _hx509_check_key_usage
1557 * keyset.c: changed signature of _hx509_query_match_cert
1559 * hx509.h: Add support for error strings.
1561 * cms.c: changed signature of _hx509_check_key_usage
1563 * Makefile.am: ibhx509_la_files += error.c
1565 * ks_file.c: Sprinkel setting error strings.
1567 * cert.c: Sprinkel setting error strings.
1569 * hx_locl.h: Add support for error strings.
1571 * error.c: Add string error handling functions.
1573 * keyset.c (hx509_certs_init): pass the right error code back
1575 2006-04-30 Love Hörnquist Åstrand <lha@it.su.se>
1577 * revoke.c: Revert previous patch.
1578 (hx509_ocsp_verify): new function that returns the expiration of
1579 certificate in ocsp data-blob
1581 * cert.c: Reverse previous patch, lets do it another way.
1583 * cert.c (hx509_revoke_verify): update usage
1585 * revoke.c: Make compile.
1587 * revoke.c: Add the expiration time the crl/ocsp info expire
1589 * name.c: Add hx509_name_is_null_p
1591 * cert.c: remove _hx509_cert_private_sigature
1593 2006-04-29 Love Hörnquist Åstrand <lha@it.su.se>
1595 * name.c: Expose more of Name.
1597 * hxtool.c (main): add missing argument to printf
1599 * data/openssl.cnf: Add EKU for the KDC certificate
1601 * cert.c (hx509_cert_get_base_subject): reject un-canon proxy
1602 certs, not the reverse
1603 (add_to_list): constify and fix argument order to
1605 (hx509_cert_find_subjectAltName_otherName): make work
1607 2006-04-28 Love Hörnquist Åstrand <lha@it.su.se>
1609 * data/{pkinit,kdc}.{crt,key}: pkinit certificates
1611 * data/gen-req.sh: Generate pkinit certificates.
1613 * data/openssl.cnf: Add pkinit glue.
1615 * cert.c (hx509_verify_hostname): implement stub function
1617 2006-04-27 Love Hörnquist Åstrand <lha@it.su.se>
1619 * TODO: CRL delta support
1621 2006-04-26 Love Hörnquist Åstrand <lha@it.su.se>
1623 * data/.cvsignore: ignore leftover from OpenSSL cert generation
1625 * hx509_err.et: Add name malformated error
1627 * name.c (hx509_parse_name): don't abort on error, rather return
1630 * test_name.c: Test failure parsing name.
1632 * cert.c: When verifying certificates, store subject basename for
1635 * test_name.c: test to parse and print name and check that they
1638 * name.c (hx509_parse_name): fix length argument to printf string
1640 * name.c (hx509_parse_name): fix length argument to stringtooid, 1
1643 * cert.c: remove debug printf's
1645 * name.c (hx509_parse_name): make compile pre c99
1647 * data/gen-req.sh: OpenSSL have a serious issue of user confusion
1648 -subj in -ca takes the arguments in LDAP order. -subj for x509
1649 takes it in x509 order.
1651 * cert.c (hx509_verify_path): handle the case where the where two
1652 proxy certs in a chain.
1654 * test_chain.in: enable two proxy certificates in a chain test
1656 * test_chain.in: tests proxy certificates
1660 * data/gen-req.sh: build proxy certificates
1662 * data/openssl.cnf: add def for proxy10_cert
1664 * hx509_err.et: Add another proxy certificate error.
1666 * cert.c (hx509_verify_path): Need to mangle name to remove the CN
1667 of the subject, copying issuer only works for one level but is
1668 better then doing no checking at all.
1670 * hxtool.c: Add verify --allow-proxy-certificate.
1672 * hxtool-commands.in: add verify --allow-proxy-certificate
1674 * hx509_err.et: Add proxy certificate errors.
1676 * cert.c: Fix comment about subject name of proxy certificate.
1678 * test_chain.in: tests for proxy certs
1680 * data/gen-req.sh: gen proxy and non-proxy tests certificates
1682 * data/openssl.cnf: Add definition for proxy certs
1684 * data/*proxy-test.*: Add proxy certificates
1686 * cert.c (hx509_verify_path): verify proxy certificate have no san
1689 * cert.c (hx509_verify_set_proxy_certificate): Add
1690 (*): rename policy cert to proxy cert
1692 * cert.c: Initial support for proxy certificates.
1694 2006-04-24 Love Hörnquist Åstrand <lha@it.su.se>
1696 * hxtool.c: some error checking
1698 * name.c: Switch over to asn1 generaed oids.
1700 * TODO: merge with old todo file
1702 2006-04-23 Love Hörnquist Åstrand <lha@it.su.se>
1704 * test_query.in: make quiet
1706 * test_req.in: SKIP test if there is no RSA support.
1708 * hxtool.c: print dh method too
1710 * test_chain.in: SKIP test if there is no RSA support.
1712 * test_cms.in: SKIP test if there is no RSA support.
1714 * test_nist.in: SKIP test if there is no RSA support.
1716 2006-04-22 Love Hörnquist Åstrand <lha@it.su.se>
1718 * hxtool-commands.in: Allow passing in pool and anchor to
1721 * hxtool.c: Allow passing in pool and anchor to signedData
1723 * test_cms.in: Test that certs in signed data is picked up.
1725 * hx_locl.h: Expose the path building function to internal
1728 * cert.c: Expose the path building function to internal functions.
1730 * hxtool-commands.in: cms-envelope: Add support for choosing the
1733 * hxtool.c (cms_create_enveloped): Add support for choosing the
1736 * test_cms.in: Test generating des-ede3 aes-128 aes-256 enveloped
1739 * crypto.c: Add names to cipher types.
1741 * cert.c (hx509_query_match_friendly_name): fix return value
1743 * data/gen-req.sh: generate tests for enveloped data using
1746 * test_cms.in: add tests for enveloped data using des-ede3 and
1749 * cert.c (hx509_query_match_friendly_name): New function.
1751 2006-04-21 Love Hörnquist Åstrand <lha@it.su.se>
1753 * ks_p11.c: Add support for parsing slot-number.
1755 * crypto.c (oid_private_rc2_40): simply
1757 * crypto.c: Use oids from asn1 generator.
1759 * ks_file.c (file_init): reset length when done with a part
1761 * test_cms.in: check with test.combined.crt.
1763 * data/gen-req.sh: Create test.combined.crt.
1765 * test_cms.in: Test signed data using keyfile that is encrypted.
1767 * ks_file.c: Remove (commented out) debug printf
1769 * ks_file.c (parse_rsa_private_key): use EVP_get_cipherbyname
1771 * ks_file.c (parse_rsa_private_key): make working for one
1774 * ks_file.c (parse_rsa_private_key): Implement enought for
1777 * hx_locl.h: Add <ctype.h>
1779 * ks_file.c: Add glue code for PEM encrypted password files.
1781 * test_cms.in: Add commeted out password protected PEM file,
1782 remove password for those tests that doesn't need it.
1784 * test_cms.in: adapt test now that we can use any certificate and
1787 * collector.c: handle PEM RSA PRIVATE KEY files
1789 * cert.c: Remove unused function.
1791 * ks_dir.c: move code here from ks_file.c now that its no longer
1794 * ks_file.c: Add support for parsing unencrypted RSA PRIVATE KEY
1796 * crypto.c: Handle rsa private keys better.
1798 2006-04-20 Love Hörnquist Åstrand <lha@it.su.se>
1800 * hxtool.c: Use hx509_cms_{,un}wrap_ContentInfo
1802 * cms.c: Make hx509_cms_{,un}wrap_ContentInfo usable in asn1
1805 * cert.c (hx509_verify_path): if trust anchor is not self signed,
1806 don't check sig From Douglas Engert.
1808 * test_chain.in: test "sub-cert -> sub-ca"
1810 * crypto.c: Use the right length for the sha256 checksums.
1812 2006-04-15 Love Hörnquist Åstrand <lha@it.su.se>
1814 * crypto.c: Fix breakage from sha256 code.
1816 * crypto.c: Add SHA256 support, and symbols for the other new
1819 2006-04-14 Love Hörnquist Åstrand <lha@it.su.se>
1821 * test_cms.in: test rc2-40 rc2-64 rc2-128 enveloped data
1823 * data/test-enveloped-rc2-{40,64,128}: add tests cases for rc2
1825 * cms.c: Update prototypes changes for hx509_crypto_[gs]et_params.
1827 * crypto.c: Break out the parameter handling code for encrypting
1828 data to handle RC2. Needed for Windows 2k pk-init support.
1830 2006-04-04 Love Hörnquist Åstrand <lha@it.su.se>
1832 * Makefile.am: Split libhx509_la_SOURCES into build file and
1833 distributed files so we can avoid building prototypes for
1836 2006-04-03 Love Hörnquist Åstrand <lha@it.su.se>
1838 * TODO: split certificate request into pkcs10 and CRMF
1840 * hxtool-commands.in: Add nonce flag to ocsp-fetch
1842 * hxtool.c: control sending nonce
1844 * hxtool.c (request_create): store the request in a file, no in
1847 * cert.c: expose print_cert_subject internally
1849 * hxtool.c: Add ocsp_print.
1851 * hxtool-commands.in: New command "ocsp-print".
1853 * hx_locl.h: Include <hex.h>.
1855 * revoke.c (verify_ocsp): require issuer to match too.
1856 (free_ocsp): new function
1857 (hx509_revoke_ocsp_print): new function, print ocsp reply
1859 * Makefile.am: build CRMF files
1861 * data/key.der: needed for cert request test
1863 * test_req.in: adapt to rename of pkcs10-create to request-create
1865 * hxtool.c: adapt to rename of pkcs10-create to request-create
1867 * hxtool-commands.in: Rename pkcs10-create to request-create
1869 * crypto.c: (_hx509_parse_private_key): Avoid crashing on bad input.
1871 * hxtool.c (pkcs10_create): use opt->subject_string
1873 * hxtool-commands.in: Add pkcs10-create --subject
1875 * Makefile.am: Add test_req to tests.
1877 * test_req.in: Test for pkcs10 commands.
1879 * name.c (hx509_parse_name): new function.
1881 * hxtool.c (pkcs10_create): implement
1883 * hxtool-commands.in (pkcs10-create): Add arguments
1885 * crypto.c: Add _hx509_private_key2SPKI and support
1886 functions (only support RSA for now).
1888 2006-04-02 Love Hörnquist Åstrand <lha@it.su.se>
1890 * hxtool-commands.in: Add pkcs10-create command.
1892 * hx509.h: Add hx509_request.
1896 * Makefile.am: Add req.c
1898 * req.c: Create certificate requests, prototype converts the
1899 request in a pkcs10 packet.
1901 * hxtool.c: Add pkcs10_create
1903 * name.c (hx509_name_copy): new function.
1905 2006-04-01 Love Hörnquist Åstrand <lha@it.su.se>
1907 * TODO: fill out what do
1909 * hxtool-commands.in: add pkcs10-print
1911 * hx_locl.h: Include <pkcs10_asn1.h>.
1913 * pkcs10.asn1: PKCS#10
1915 * hxtool.c (pkcs10_print): new function.
1917 * test_chain.in: test ocsp keyhash
1919 * data: generate ocsp keyhash version too
1921 * revoke.c (load_ocsp): test that we got back a BasicReponse
1923 * ocsp.asn1: Add asn1_id_pkix_ocsp*.
1925 * Makefile.am: Add asn1_id_pkix_ocsp*.
1927 * cert.c: Add HX509_QUERY_MATCH_KEY_HASH_SHA1
1929 * hx_locl.h: Add HX509_QUERY_MATCH_KEY_HASH_SHA1
1931 * revoke.c: Support OCSPResponderID.byKey, indent.
1933 * revoke.c (hx509_ocsp_request): Add nonce to ocsp request.
1935 * hxtool.c: Add nonce to ocsp request.
1937 * test_chain.in: Added crl tests
1939 * data/nist-data: rename missing-crl to missing-revoke
1941 * data: make ca use openssl ca command so we can add ocsp tests,
1944 * test_chain.in: Add revoked ocsp cert test
1946 * cert.c: rename missing-crl to missing-revoke
1948 * revoke.c: refactor code, fix a un-init-ed variable
1950 * test_chain.in: rename missing-crl to missing-revoke add ocsp
1953 * test_cms.in: rename missing-crl to missing-revoke
1955 * hxtool.c: rename missing-crl to missing-revoke
1957 * hxtool-commands.in: rename missing-crl to missing-revoke
1959 * revoke.c: Plug one memory leak.
1961 * revoke.c: Renamed generic CRL related errors.
1963 * hx509_err.et: Comments and renamed generic CRL related errors
1965 * revoke.c: Add ocsp checker.
1967 * ocsp.asn1: Add id-kp-OCSPSigning
1969 * hxtool-commands.in: add url-path argument to ocsp-fetch
1971 * hxtool.c: implement ocsp-fetch
1973 * cert.c: Use HX509_DEFAULT_OCSP_TIME_DIFF.
1975 * hx_locl.h: Add ocsp_time_diff to hx509_context
1977 * crypto.c (_hx509_verify_signature_bitstring): new function,
1978 commonly use when checking certificates
1980 * cms.c (hx509_cms_envelope_1): check for internal ASN.1 encoder
1983 * cert.c: Add ocsp glue, use new
1984 _hx509_verify_signature_bitstring, add eku checking function.
1986 2006-03-31 Love Hörnquist Åstrand <lha@it.su.se>
1988 * Makefile.am: add id_kp_OCSPSigning.x
1990 * revoke.c: Pick out certs in ocsp response
1992 * TODO: list of stuff to verify
1994 * revoke.c: Add code to load OCSPBasicOCSPResponse files, reload
1995 crl when its changed on disk.
1997 * cert.c: Update for ocsp merge. handle building path w/o
1998 subject (using subject key id)
2000 * ks_p12.c: _hx509_map_file changed prototype.
2002 * file.c: _hx509_map_file changed prototype, returns struct stat
2005 * ks_file.c: _hx509_map_file changed prototype.
2007 * hxtool.c: Add stub for ocsp-fetch, _hx509_map_file changed
2008 prototype, add ocsp parsing to verify command.
2010 * hx_locl.h: rename HX509_CTX_CRL_MISSING_OK to
2011 HX509_CTX_VERIFY_MISSING_OK now that we have OCSP glue
2013 2006-03-30 Love Hörnquist Åstrand <lha@it.su.se>
2015 * hx_locl.h: Add <krb5-types.h> to make it compile on Solaris,
2016 from Alex V. Labuta.
2018 2006-03-28 Love Hörnquist Åstrand <lha@it.su.se>
2020 * crypto.c (_hx509_pbe_decrypt): try all passwords, not just the
2023 2006-03-27 Love Hörnquist Åstrand <lha@it.su.se>
2025 * print.c (check_altName): Print the othername oid.
2027 * crypto.c: Manual page claims RSA_public_decrypt will return -1
2028 on error, lets check for that
2030 * crypto.c (_hx509_pbe_decrypt): also try the empty password
2032 * collector.c (match_localkeyid): no need to add back the cert to
2033 the cert pool, its already there.
2035 * crypto.c: Add REQUIRE_SIGNER
2037 * cert.c (hx509_cert_free): ok to free NULL
2039 * hx509_err.et: Add new error code SIGNATURE_WITHOUT_SIGNER.
2041 * name.c (_hx509_name_ds_cmp): make DirectoryString case
2043 (hx509_name_to_string): less spacing
2045 * cms.c: Check for signature error, check consitency of error
2047 2006-03-26 Love Hörnquist Åstrand <lha@it.su.se>
2049 * collector.c (_hx509_collector_alloc): handle errors
2051 * cert.c (hx509_query_alloc): allocate slight more more then a
2054 * crypto.c (_hx509_private_key_assign_key_file): ask for password
2057 * cert.c: Expose more of the hx509_query interface.
2059 * collector.c: hx509_certs_find is now exposed.
2061 * cms.c: hx509_certs_find is now exposed.
2063 * revoke.c: hx509_certs_find is now exposed.
2065 * keyset.c (hx509_certs_free): allow free-ing NULL
2066 (hx509_certs_find): expose
2067 (hx509_get_one_cert): new function
2069 * hxtool.c: hx509_certs_find is now exposed.
2071 * hx_locl.h: Remove hx509_query, its exposed now.
2073 * hx509.h: Add hx509_query.
2075 2006-02-22 Love Hörnquist Åstrand <lha@it.su.se>
2077 * cert.c: Add exceptions for null (empty) subjectNames
2079 * data/nist-data: Add some more name constraints tests.
2081 * data/nist-data: Add some of the test from 4.13 Name Constraints.
2083 * cert.c: Name constraits needs to be evaluated in block as they
2084 appear in the certificates, they can not be joined to one
2085 list. One example of this is:
2087 - cert is cn=foo,dc=bar,dc=baz
2088 - subca is dc=foo,dc=baz with name restriction dc=kaka,dc=baz
2089 - ca is dc=baz with name restriction dc=baz
2091 If the name restrictions are merged to a list, the certificate
2092 will pass this test.
2094 2006-02-14 Love Hörnquist Åstrand <lha@it.su.se>
2096 * cert.c: Handle more name constraints cases.
2098 * crypto.c (dsa_verify_signature): if test if malloc failed
2100 2006-01-31 Love Hörnquist Åstrand <lha@it.su.se>
2102 * cms.c: Drop partial pkcs12 string2key implementation.
2104 2006-01-20 Love Hörnquist Åstrand <lha@it.su.se>
2106 * data/nist-data: Add commited out DSA tests (they fail).
2108 * data/nist-data: Add 4.2 Validity Periods.
2110 * test_nist.in: Make less verbose to use.
2112 * Makefile.am: Add test_nist_cert.
2114 * data/nist-data: Add some more CRL-tests.
2116 * test_nist.in: Print $id instead of . when running the tests.
2118 * test_nist.in: Drop verifying certifiates, its done in another
2121 * data/nist-data: fixup kill-rectangle leftovers
2123 * data/nist-data: Drop verifying certifiates, its done in another
2124 test now. Add more crl tests. comment out all unused tests.
2126 * test_nist_cert.in: test parse all nist certs
2128 2006-01-19 Love Hörnquist Åstrand <lha@it.su.se>
2130 * hx509_err.et: Add HX509_CRL_UNKNOWN_EXTENSION.
2132 * revoke.c: Check for unknown extentions in CRLs and CRLEntries.
2134 * test_nist.in: Parse new format to handle CRL info.
2136 * test_chain.in: Add --missing-crl.
2138 * name.c (hx509_unparse_der_name): Rename from hx509_parse_name.
2139 (_hx509_unparse_Name): Add.
2141 * hxtool-commands.in: Add --missing-crl to verify commands.
2143 * hx509_err.et: Add CRL errors.
2145 * cert.c (hx509_context_set_missing_crl): new function Add CRL
2148 * hx_locl.h: Add HX509_CTX_CRL_MISSING_OK.
2150 * revoke.c: Parse and verify CRLs (simplistic).
2152 * hxtool.c: Parse CRL info.
2154 * data/nist-data: Change format so we can deal with CRLs, also
2155 note the test-id from PKITS.
2157 * data: regenerate test
2159 * data/gen-req.sh: use static-file to generate tests
2161 * data/static-file: new file to use for commited tests
2163 * test_cms.in: Use static file, add --missing-crl.
2165 2006-01-18 Love Hörnquist Åstrand <lha@it.su.se>
2167 * print.c: Its cRLReason, not cRLReasons.
2169 * hxtool.c: Attach revoke context to verify context.
2171 * data/nist-data: change syntax to make match better with crl
2174 * cert.c: Verify no certificates has been revoked with the new
2177 * Makefile.am: libhx509_la_SOURCES += revoke.c
2179 * revoke.c: Add framework for handling CRLs.
2181 * hx509.h: Add hx509_revoke_ctx.
2183 2006-01-13 Love Hörnquist Åstrand <lha@it.su.se>
2185 * delete crypto_headers.h, use global file instead.
2187 * crypto.c (PBE_string2key): libdes now supports PKCS12_key_gen
2189 2006-01-12 Love Hörnquist Åstrand <lha@it.su.se>
2191 * crypto_headers.h: Need BN_is_negative too.
2193 2006-01-11 Love Hörnquist Åstrand <lha@it.su.se>
2195 * ks_p11.c (p11_rsa_public_decrypt): since is wrong, don't provide
2196 it. PKCS11 can't do public_decrypt, it support verify though. All
2197 this doesn't matter, since the code never go though this path.
2199 * crypto_headers.h: Provide glue to compile with less warnings
2202 2006-01-08 Love Hörnquist Åstrand <lha@it.su.se>
2204 * Makefile.am: Depend on LIB_des
2206 * lock.c: Use "crypto_headers.h".
2208 * crypto_headers.h: Include the two diffrent implementation of
2211 * cert.c: Use "crypto-headers.h". Load ENGINE configuration.
2213 * crypto.c: Make compile with both OpenSSL and heimdal libdes.
2215 * ks_p11.c: Add code for public key decryption (not supported yet)
2216 and use "crypto-headers.h".
2219 2006-01-04 Love Hörnquist Åstrand <lha@it.su.se>
2221 * add a hx509_context where we can store configuration
2223 * p11.c,Makefile.am: pkcs11 is now supported by library, remove
2226 * ks_p11.c: more paranoid on refcount, set refcounter ealier,
2227 reset pointers after free
2229 * collector.c (struct private_key): remove temporary key data
2230 storage, convert directly to a key
2231 (match_localkeyid): match certificate and key using localkeyid
2232 (match_keys): match certificate and key using _hx509_match_keys
2233 (_hx509_collector_collect): rewrite to use match_keys and
2236 * crypto.c (_hx509_match_keys): function that determins if a
2237 private key matches a certificate, used when there is no
2239 (*) reset free pointer
2241 * ks_file.c: Rewrite to use collector and mapping support
2244 * ks_p11.c (rsa_pkcs1_method): constify
2246 * ks_p11.c: drop extra wrapping of p11_init
2248 * crypto.c (_hx509_private_key_assign_key_file): use function to
2251 * cert.c: Revert previous, refcounter is unsigned, so it can never
2254 * cert.c (hx509_cert_ref): more refcount paranoia
2256 * ks_p11.c: Implement rsa_private_decrypt and add stubs for public
2259 * ks_p11.c: Less printf, less memory leaks.
2261 * ks_p11.c: Implement signing using pkcs11.
2263 * ks_p11.c: Partly assign private key, enough to complete
2264 collection, but not any crypto functionallity.
2266 * collector.c: Use hx509_private_key to assign private keys.
2268 * crypto.c: Remove most of the EVP_PKEY code, and use RSA
2269 directly, this temporary removes DSA support.
2271 * hxtool.c (print_f): print if there is a friendly name and if
2272 there is a private key
2274 2006-01-03 Love Hörnquist Åstrand <lha@it.su.se>
2276 * name.c: Avoid warning from missing __attribute__((noreturn))
2278 * lock.c (_hx509_lock_unlock_certs): return unlock certificates
2280 * crypto.c (_hx509_private_key_assign_ptr): new function, exposes
2282 (_hx509_private_key_assign_key_file): remember to free private key
2285 * cert.c (_hx509_abort): add newline to output and flush stdout
2287 * Makefile.am: libhx509_la_SOURCES += collector.c
2289 * hx_locl.h: forward type declaration of struct hx509_collector.
2291 * collector.c: Support functions to collect certificates and
2292 private keys and then match them.
2294 * ks_p12.c: Use the new hx509_collector support functions.
2296 * ks_p11.c: Add enough glue to support certificate iteration.
2298 * test_nist_pkcs12.in: Less verbose.
2300 * cert.c (hx509_cert_free): if there is a private key assosited
2301 with this cert, free it
2303 * print.c: Use _hx509_abort.
2305 * ks_p12.c: Use _hx509_abort.
2307 * hxtool.c: Use _hx509_abort.
2309 * crypto.c: Use _hx509_abort.
2311 * cms.c: Use _hx509_abort.
2313 * cert.c: Use _hx509_abort.
2315 * name.c: use _hx509_abort
2317 2006-01-02 Love Hörnquist Åstrand <lha@it.su.se>
2319 * name.c (hx509_name_to_string): don't cut bmpString in half.
2321 * name.c (hx509_name_to_string): don't overwrite with 1 byte with
2324 * ks_file.c (parse_certificate): avoid stomping before array
2326 * name.c (oidtostring): avoid leaking memory
2328 * keyset.c: Add _hx509_ks_dir_register.
2330 * Makefile.am (libhx509_la_SOURCES): += ks_dir.c
2332 * hxtool-commands.in: Remove pkcs11.
2334 * hxtool.c: Remove pcert_pkcs11.
2336 * ks_file.c: Factor out certificate parsing code.
2338 * ks_dir.c: Add new keystore that treats all files in a directory
2339 a keystore, useful for regression tests.
2341 2005-12-12 Love Hörnquist Åstrand <lha@it.su.se>
2343 * test_nist_pkcs12.in: Test parse PKCS12 files from NIST.
2345 * data/nist-data: Can handle DSA certificate.
2347 * hxtool.c: Print error code on failure.
2349 2005-10-29 Love Hörnquist Åstrand <lha@it.su.se>
2351 * crypto.c: Support DSA signature operations.
2353 2005-10-04 Love Hörnquist Åstrand <lha@it.su.se>
2355 * print.c: Validate that issuerAltName and subjectAltName isn't
2358 2005-09-14 Love Hörnquist Åstrand <lha@it.su.se>
2360 * p11.c: Cast to unsigned char to avoid warning.
2362 * keyset.c: Register pkcs11 module.
2364 * Makefile.am: Add ks_p11.c, install hxtool.
2366 * ks_p11.c: Starting point of a pkcs11 module.
2368 2005-09-04 Love Hörnquist Åstrand <lha@it.su.se>
2370 * lock.c: Implement prompter.
2372 * hxtool-commands.in: add --content to print
2374 * hxtool.c: Split verify and print.
2376 * cms.c: _hx509_pbe_decrypt now takes a hx509_lock.
2378 * crypto.c: Make _hx509_pbe_decrypt take a hx509_lock, workaround
2381 * name.c: Add DC, handle all Directory strings, fix signless
2384 2005-09-03 Love Hörnquist Åstrand <lha@it.su.se>
2386 * test_query.in: Pass in --pass to all commands.
2388 * hxtool.c: Use option --pass.
2390 * hxtool-commands.in: Add --pass to all commands.
2392 * hx509_err.et: add UNKNOWN_LOCK_COMMAND and CRYPTO_NO_PROMPTER
2394 * test_cms.in: pass in password to cms-create-sd
2396 * crypto.c: Abstract out PBE_string2key so I can add PBE2 s2k
2397 later. Avoid signess warnings with OpenSSL.
2399 * cms.c: Use void * instead of char * for to avoid signedness
2402 * cert.c (hx509_cert_get_attribute): remove const, its not
2404 * ks_p12.c: Cast size_t to unsigned long when print.
2406 * name.c: Fix signedness warning.
2408 * test_query.in: Use echo, the function check isn't defined here.
2410 2005-08-11 Love Hörnquist Åstrand <lha@it.su.se>
2412 * hxtool-commands.in: Add more options that was missing.
2414 2005-07-28 Love Hörnquist Åstrand <lha@it.su.se>
2416 * test_cms.in: Use --certificate= for enveloped/unenvelope.
2418 * hxtool.c: Use --certificate= for enveloped/unenvelope. Clean
2421 * test_cms.in: add EnvelopeData tests
2423 * hxtool.c: use id-envelopedData for ContentInfo
2425 * hxtool-commands.in: add contentinfo wrapping for create/unwrap
2428 * hxtool.c: add contentinfo wrapping for create/unwrap enveloped
2431 * data/gen-req.sh: add enveloped data (aes128)
2433 * crypto.c: add "new" RC2 oid
2435 2005-07-27 Love Hörnquist Åstrand <lha@it.su.se>
2437 * hx_locl.h, cert.c: Add HX509_QUERY_MATCH_FUNCTION that allows
2438 caller to match by function, note that this doesn't not work
2439 directly for backends that implements ->query, they must do their
2440 own processing. (I'm running out of flags, only 12 left now)
2442 * test_cms.in: verify ContentInfo wrapping code in hxtool
2444 * hxtool-commands.in (cms_create_sd): support wrapping in content
2447 * hxtool.c (cms_create_sd): support wrapping in content info
2449 * test_cms.in: test more cms signeddata messages
2451 * data/gen-req.sh: generate SignedData
2453 * hxtool.c (cms_create_sd): support certificate store, add support
2454 to unwrap a ContentInfo the SignedData inside.
2456 * crypto.c: sprinkel rk_UNCONST
2458 * crypto.c: add DER NULL to the digest oid's
2460 * hxtool-commands.in: add --content-info to cms-verify-sd
2462 * cms.c (hx509_cms_create_signed_1): pass in a full
2463 AlgorithmIdentifier instead of heim_oid for digest_alg
2465 * crypto.c: make digest_alg a digest_oid, it's not needed right
2468 * hx509_err.et: add CERT_NOT_FOUND
2470 * keyset.c (_hx509_certs_find): add error code for cert not
2473 * cms.c (hx509_cms_verify_signed): add external store of
2474 certificates, use the right digest algorithm identifier.
2476 * cert.c: fix const warning
2478 * ks_p12.c: slightly less verbose
2480 * cert.c: add hx509_cert_find_subjectAltName_otherName, add
2481 HX509_QUERY_MATCH_FRIENDLY_NAME
2483 * hx509.h: add hx509_octet_string_list, remove bad comment
2485 * hx_locl.h: add HX509_QUERY_MATCH_FRIENDLY_NAME
2487 * keyset.c (hx509_certs_append): needs a hx509_lock, add one
2489 * Makefile.am: add test cases tempfiles to CLEANFILES
2491 * Makefile.am: add test_query to TESTS, fix dependency on hxtool
2492 sources on hxtool-commands.h
2494 * hxtool-commands.in: explain what signer is for create-sd
2496 * hxtool.c: add query, add more options to verify-sd and create-sd
2498 * test_cms.in: add more cms tests
2500 * hxtool-commands.in: add query, add more options to verify-sd
2502 * test_query.in: test query interface
2504 * data: fix filenames for ds/ke files, add pkcs12 files, regen
2506 * hxtool.c,Makefile.am,hxtool-commands.in: switch to slc
2508 2005-07-26 Love Hörnquist Åstrand <lha@it.su.se>
2510 * cert.c (hx509_verify_destroy_ctx): add
2512 * hxtool.c: free hx509_verify_ctx
2514 * name.c (_hx509_name_ds_cmp): make sure all strings are not equal
2516 2005-07-25 Love Hörnquist Åstrand <lha@it.su.se>
2518 * hxtool.c: return error
2520 * keyset.c: return errors from iterations
2522 * test_chain.in: clean up checks
2524 * ks_file.c (parse_certificate): return errno's not 1 in case of
2527 * ks_file.c (file_iter): make sure endpointer is NULL
2529 * ks_mem.c (mem_iter): follow conversion and return NULL when we
2530 get to the end, not ENOENT.
2532 * Makefile.am: test_chain depends on hxtool
2534 * data: test certs that lasts 10 years
2536 * data/gen-req.sh: script to generate test certs
2538 * Makefile.am: Add regression tests.
2540 * data: test certificate and keys
2542 * test_chain.in: test chain
2544 * hxtool.c (cms_create_sd): add KU digitalSigature as a
2545 requirement to the query
2547 * hx_locl.h: add KeyUsage query bits
2549 * hx509_err.et: add KeyUsage error
2551 * cms.c: add checks for KeyUsage
2553 * cert.c: more checks on KeyUsage, allow to query on them too
2555 2005-07-24 Love Hörnquist Åstrand <lha@it.su.se>
2557 * cms.c: Add missing break.
2559 * hx_locl.h,cms.c,cert.c: allow matching on SubjectKeyId
2561 * hxtool.c: Use _hx509_map_file, _hx509_unmap_file and
2564 * file.c (_hx509_write_file): in case of write error, return errno
2566 * file.c (_hx509_write_file): add a function that write a data
2571 * Import mostly complete X.509 and CMS library. Handles, PEM, DER,
2572 PKCS12 encoded certicates. Verificate RSA chains and handled
2573 CMS's SignedData, and EnvelopedData.