2020-02-29  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 3.6
	* configure.ac: Bump up the minor version number.
	* Makefile.am: Reset the REVISION number and bump up the CURRENT
	and AGE numbers.
	* tls/Makefile.am: Bump up the REVISION number.

2020-02-27  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tls/handshake/mesasge/certreq.c (read_cert_authorities): Fix a
	buffer overflow. [#448]
	* tls/tls_cert.c (TLS_get_client_cert, TLS_get_server_cert): More
	suitably handle a dynamic allocated memory. [#437]

2020-02-26  SAKANE Eisaku  <sakane@nii.ac.jp>

	* ssl/Makefile.am: Add test/getfpath.c to *_SOURCES.
	* configure.ac: Disable AiSSL in default.

2019-08-16  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/message/cert.c (check_ecdsa_sigscheme_availability)
	(search_sighash_for_ecdsa): Modify interface.
	* tls/handshake/message/cert.c (check_ecdsa_sigscheme_availability): Use
	curve type of public key in ECDSA certificate to select correct
	signature algorithm.
	* tls/handshake/message/cert.c (search_sighash_for_ecdsa): Call
	check_ecdsa_sigscheme_availability() with new interface.
	* tls/handshake/message/cert.c (is_compatible_with_sighash): Call
	search_sighash_for_ecdsa() with new interface.
	* tls/handshake/message/cert.c (is_compatible_with_sighash): Stop using
	elliptic curve types in supported_groups extension because the use is
	not specified in TLS 1.3.

2019-08-16  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/tls_digitally_signed.c (check_ecdsa_sigscheme_availability):
	Modify interface.
	* tls/tls_digitally_signed.c (check_ecdsa_sigscheme_availability): Use
	curve type of public key in ECDSA certificate to select correct
	signature algorithm.
	* tls/tls_digitally_signed.c (get_signature_scheme, check_cert):
	Call check_ecdsa_sigscheme_availability() with new interface.

2019-08-16  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/extension/sighash.c: Enable
	TLS_SS_ECDSA_SECP384R1_SHA384 and TLS_SS_ECDSA_SECP521R1_SHA512
	as TLS 1.3 signature algorithm.

2019-08-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* build-aux/ar-lib: Update from Automake 1.16.1.
	* build-aux/compile: Ditto.
	* build-aux/config.guess: Ditto.
	* build-aux/config.sub: Ditto.
	* build-aux/depcomp: Ditto.
	* build-aux/install-sh: Ditto.
	* build-aux/missing: Ditto.
	* build-aux/test-driver: Ditto.
	* build-aux/ltmain.sh: Update from Libtool 2.4.6.
	* m4/libtool.m4: Ditto.
	* m4/ltoptions.m4: Ditto.
	* m4/ltsugar.m4: Ditto.
	* m4/ltversion.m4: Ditto.
	* m4/lt~obsolete.m4: Ditto.

2019-08-08  SAKANE Eisaku  <sakane@nii.ac.jp>

	* sha3/Makefile.am: Directly specify source files without
	unexpanded variables to make variables.
	* chacha/Makefile.am: Likewise.
	* edc/Makefile.am: Likewise.
	* test/Makefile.am: Remove the target libtest.la.
	* rsa/Makefile.am: Add the target t-rsa.
	* tool/Makefile.am: Add the target t-digest.
	* test/t-rsa.sh: New file.
	* test/t-digest.sh: Ditto.

2019-08-01  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tls/handshake/message/cert.c (search_sighash_for_rsassa_pss):
	Add the attribute UNUSED in the declaration of the function.
	* tls/tls_digitally_signed.c
	(check_rsassa_pss_sigscheme_availability): Likewise.
	* edc/Makefile.am: Revive the option "-Werror" in AM_CFLAGS.
	* configure.ac: Remove the option "no-dependencies" in
	AM_INIT_AUTOMAKE, and now use Automake 1.16.

2019-07-11  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Add a macro checking the declaration of
	posix_memalign(3).

2019-04-18  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/tls.c (free_cipher_param): Fix double free().

	* tls/handshake/extension/sighash.c (tls_hs_sighash_list)
	(tls_hs_sighash_list_cert): Fix memset() length.

2019-04-17  OHASHI Hiroki  <hiroki@soum.co.jp>

	* aicrypto/ok_err.h: Add OK_set_error() points.
	* tls/handshake/extension/cookie.c (write_cookie_for_2ndchello)
	(read_cookie_in_hrr, tls_hs_cookie_write): Add length check/comment.
	* tls/handshake/extension/ecc.c (write_elliptic_curve_list)
	(write_ec_point_format_list, tls_hs_ecc_write_elliptic_curves)
	(tls_hs_ecc_write_ec_point_formats, tls_hs_ecc_read_elliptic_curves)
	(tls_hs_ecc_read_point_format): Ditto.
	* tls/handshake/extension/keyshare.c (write_keyshare_for_chello)
	(write_keyshare_for_2ndchello, write_keyshare_for_shello)
	(tls_hs_keyshare_write): Ditto.
	* tls/handshake/extension/servername.c (write_hostname)
	(read_hostname, write_server_name_by_client)
	(read_server_name_by_server, tls_hs_servername_write): Ditto.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_write)
	(tls_hs_sighash_cert_write, tls_hs_sighash_read)
	(tls_hs_sighash_cert_read): Ditto.
	* tls/handshake/extension/supported_versions.c
	(write_supported_versions_for_chello, read_supported_versions_in_chello)
	(tls_hs_supported_versions_write): Ditto.

	* aicrypto/ok_err.h: Add OK_set_error() points.
	* tls/include/tls.h: Add new macro TLS_VECTOR_1_BYTE_SIZE_MAX,
	TLS_VECTOR_2_BYTE_SIZE_MAX and TLS_VECTOR_3_BYTE_SIZE_MAX.
	* tls/handshake/message/cert.c (write_certchain_up_to_tls12)
	(write_certchain_tls13, read_certchain_up_to_tls12)
	(read_certchain_tls13): Add length check/comment.
	* tls/handshake/message/certreq.c (write_cert_type, read_cert_type)
	(read_cert_authorities, write_ext_sigalgo, write_ext_sigalgo_cert)
	(write_ext_cert_authorities, write_certreq_tls13, read_certreq_tls13):
	Ditto.
	* tls/handshake/message/chello.c (write_session_id, write_cipher_suite)
	(write_ext_sigalgo, write_ext_sigalgo_cert, write_ext, read_session_id)
	(read_cipher_suite, read_cmp_method): Ditto.
	* tls/handshake/message/ckeyexc.c (write_rsa_encypted_premaster)
	(read_rsa_encypted_premaster): Ditto.
	* tls/handshake/message/encext.c (read_encrypted_extensions)
	(tls_hs_encext_compose): Ditto.
	* tls/handshake/message/finished.c (read_verify_data_tls12)
	(read_verify_data_tls13): Ditto.
	* tls/handshake/message/shello.c (write_session_id)
	(write_extension_shello, write_extension_hrr, read_session_id): Ditto.
	* tls/tls_digitally_signed.c (write_digitally_signed_hash_tls12)
	(write_digitally_signed_hash_tls13, read_digitally_signed_hash_tls12)
	(read_digitally_signed_hash_tls13): Ditto.

2019-04-12  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/message/x-check_chello.c
	(test_interpret_session_id_normal_tls13_compat)
	(test_interpret_ext_list_normal_tls13_compat)
	(test_tls_hs_chello_interpret_normal_tls13_compat): New test cases.
	* tls/handshake/message/x-check_chello.c
	(interpret_session_id_suite, interpret_ext_list_suite)
	(tls_hs_chello_interpret_suite): Add new test case.
	* tls/handshake/message/x-check_shello.c
	(test_write_session_id_normal_tls13_compat)
	(test_tls_hs_shello_compose_normal_tls13_compat)
	(test_interpret_session_id_normal_tls13_compat): New test cases.
	* tls/handshake/message/x-check_shello.c (write_session_id_suite)
	(tls_hs_shello_compose_suite, interpret_session_id_suite): Add new test
	case.

	* tls/handshake/message/x-check_chello.c: Add data structure for test.

2019-04-11  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/message/x-check_shello.c
	(test_tls_hs_shello_compose_normal_tls13_after_hrr)
	(test_interpret_server_random_normal_tls13_after_hrr)
	(test_interpret_server_random_failure_tls13_after_hrr)
	(test_interpret_ext_list_normal_tls13_after_hrr)
	(test_tls_hs_shello_interpret_normal_tls13_after_hrr): New test cases.
	* tls/handshake/message/x-check_shello.c
	(tls_hs_shello_compose_suite, interpret_server_random_suite)
	(interpret_ext_list_suite, tls_hs_shello_interpret_suite): Add new test
	case.

	* tls/handshake/message/x-check_shello.c: Add data structure for test.

2019-04-10  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/message/x-check_chello.c
	(test_write_client_version_normal_2ndchello)
	(test_write_client_random_normal_2ndchello)
	(test_write_session_id_normal_2ndchello)
	(test_tls_hs_chello_compose_normal_2ndchello)
	(test_tls_hs_chello_parse_normal_tls13_2ndchello)
	(test_interpret_ext_list_normal_tls13_2ndchello)
	(test_tls_hs_chello_interpret_normal_tls13_2ndchello): New test cases.
	* tls/handshake/message/x-check_chello.c (write_client_version_suite)
	(write_client_random_suite, write_session_id_suite)
	(tls_hs_chello_compose_suite, tls_hs_chello_parse_suite)
	(interpret_ext_list_suite, tls_hs_chello_interpret_suite): Add new test
	case.

	* tls/handshake/message/x-check_chello.c: Add variables to control stub
	functions.
	* tls/handshake/message/x-check_chello.c (setup_tls): Initialize
	variables to control stub functions.
	* tls/handshake/message/x-check_chello.c (tls_util_get_epochtime)
	(tls_util_get_random): Refine stub functions.

	* tls/handshake/message/x-check_chello.c: Add data structure for test.

2019-04-05  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/message/x-check_shello.c: Add data structure for test.
	* tls/handshake/message/x-check_shello.c
	(test_read_server_random_normal_tls13_hrr)
	(test_check_ext_availability_tls13_hrr_normal)
	(test_check_ext_availability_tls13_hrr_failure)
	(test_tls_hs_extension_parse_normal_tls13_hrr)
	(test_interpret_server_random_normal_tls13_hrr)
	(test_interpret_ext_list_normal_tls13_hrr)
	(test_tls_hs_shello_interpret_normal_tls13_hrr): New test cases.
	* tls/handshake/message/x-check_shello.c
	(read_server_random_suite, check_ext_availability_tls13_hrr_suite)
	(tls_hs_extension_parse_suite, interpret_server_random_suite)
	(interpret_ext_list_suite, tls_hs_shello_interpret_suite): Add new test
	case.
	* tls/handshake/message/x-check_shello.c (main): Add new test suites.

	* tls/handshake/message/x-check_shello.c: Add data structures for test.
	* tls/handshake/message/x-check_shello.c
	(test_write_server_random_normal_tls13_hrr)
	(test_write_extension_hrr_normal)
	(test_write_extension_hrr_failure_write_2)
	(test_write_extension_hrr_failure_supported_versions_write)
	(test_write_extension_hrr_failure_keyshare_write)
	(test_tls_hs_shello_compose_normal_tls13_hrr): New test cases.
	* tls/handshake/message/x-check_shello.c (write_server_random_suite)
	(write_extension_hrr_suite): New test suites.
	* tls/handshake/message/x-check_shello.c (tls_hs_shello_compose_suite):
	Add new test case.
	* tls/handshake/message/x-check_shello.c (main): Add new test suite.

	* tls/handshake/message/x-check_shello.c: Add data structure for test.
	* tls/handshake/message/x-check_shello.c (tls_hs_keyshare_write):
	Refine stub function.

	* tls/handshake/message/x-check_chello.c: Add variables for version
	independent test message.
	* tls/handshake/message/x-check_chello.c (setup_tls): Initialize
	variables for version independent test message.
	* tls/handshake/message/x-check_chello.c (test_interpret_random_normal)
	(test_interpret_cipher_normal, test_interpret_cipher_failure)
	(test_interpret_cmp_method_failure_cmplen): New test cases.
	* tls/handshake/message/x-check_chello.c (interpret_random_suite)
	(interpret_cipher_suite, interpret_cmp_method_suite): New test suites.
	* tls/handshake/message/x-check_chello.c (main): Add new test suites.

2019-04-04  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/message/x-check_chello.c: Add data structure for test.
	* tls/handshake/message/x-check_chello.c
	(test_tls_hs_chello_compose_normal)
	(test_tls_hs_chello_compose_failure_msg_init)
	(test_tls_hs_chello_compose_failure_write_client_version)
	(test_tls_hs_chello_compose_failure_write_client_random)
	(test_tls_hs_chello_compose_failure_write_session_id)
	(test_tls_hs_chello_compose_failure_write_cipher_suite)
	(test_tls_hs_chello_compose_failure_write_cmp_method)
	(test_tls_hs_chello_compose_failure_write_ext): New test cases.
	* tls/handshake/message/x-check_chello.c (tls_hs_chello_compose_suite):
	New test suite.
	* tls/handshake/message/x-check_chello.c (main): Add new test suite.

	* tls/handshake/message/x-check_chello.c: Add data structures for test.
	* tls/handshake/message/x-check_chello.c
	(test_write_ext_sigalgo_normal, test_write_ext_sigalgo_normal_empty)
	(test_write_ext_sigalgo_failure_write_type)
	(test_write_ext_sigalgo_failure_write_length)
	(test_write_ext_sigalgo_failure_sighash_write)
	(test_write_ext_sigalgo_cert_normal)
	(test_write_ext_sigalgo_cert_normal_empty)
	(test_write_ext_sigalgo_cert_failure_write_type)
	(test_write_ext_sigalgo_cert_failure_write_length)
	(test_write_ext_sigalgo_cert_failure_sighash_cert_write)
	(test_write_ext_normal, test_write_ext_failure_write_length)
	(test_write_ext_failure_servername, test_write_ext_failure_sigalgo)
	(test_write_ext_failure_sigalgo_cert)
	(test_write_ext_failure_elliptic_curves)
	(test_write_ext_failure_ec_point_formats)
	(test_write_ext_failure_supported_versions)
	(test_write_ext_failure_keyshare): New test cases.
	* tls/handshake/message/x-check_chello.c (write_ext_sigalgo_suite)
	(write_ext_sigalgo_cert_suite, write_ext_suite): New test suites.
	* tls/handshake/message/x-check_chello.c (main): Add new test suites.

	* tls/handshake/message/x-check_chello.c
	(test_write_cmp_method_normal)
	(test_write_cmp_method_failure_write_length)
	(test_write_cmp_method_failure_write_list): New test cases.
	* tls/handshake/message/x-check_chello.c (write_cmp_method_suite):
	New test suite.
	* tls/handshake/message/x-check_chello.c (main): Add new test suite.

	* tls/handshake/message/x-check_chello.c: Add cipher identifier.
	* tls/handshake/message/x-check_chello.c
	(test_write_cipher_suite_normal)
	(test_write_cipher_suite_failure_supported_list)
	(test_write_cipher_suite_failure_write_length)
	(test_write_cipher_suite_failure_write_list): New test cases.
	* tls/handshake/message/x-check_chello.c
	(write_cipher_suite_suite): New test suite.
	* tls/handshake/message/x-check_chello.c (main): Add new test suite.

	* tls/handshake/message/x-check_chello.c
	(test_write_session_id_normal, test_write_session_id_normal)
	(test_write_session_id_failure_msg_write_1): New test cases.
	* tls/handshake/message/x-check_chello.c
	(write_session_id_suite): New test suite.
	* tls/handshake/message/x-check_chello.c (main): Add new test suite.

	* tls/handshake/message/x-check_chello.c
	(test_write_client_random_normal)
	(test_write_client_random_failure_get_epochtime)
	(test_write_client_random_failure_get_random)
	(test_write_client_random_failure_msg_write_n): New test cases.
	* tls/handshake/message/x-check_chello.c (write_client_random_suite):
	New test suite.
	* tls/handshake/message/x-check_chello.c (main): Add new test suite.

	* tls/handshake/message/x-check_chello.c
	(test_write_client_version_normal, tls_hs_msg_write_2): New test cases.
	* tls/handshake/message/x-check_chello.c
	(write_client_version_suite): New test suite.
	* tls/handshake/message/x-check_chello.c (main): Add new test suite.

	* tls/handshake/message/x-check_chello.c (setup_tls): Clear static
	message structure.
	* tls/handshake/message/x-check_chello.c (setup_client, setup_server):
	New functions.
	* tls/handshake/message/x-check_chello.c (read_client_version_suite)
	(read_client_random_suite, read_session_id_suite)
	(read_cipher_suite_suite, read_cmp_method_suite)
	(tls_hs_extension_parse_suite, read_ext_list_suite)
	(tls_hs_chello_parse_suite, interpret_session_id_suite)
	(interpret_cmp_method_suite, interpret_ext_list_suite)
	(tls_hs_chello_interpret_suite): Change setup function.

	* tls/handshake/message/x-check_chello.c: Add data structures for test.
	* tls/handshake/message/x-check_chello.c: Add variables to control stub
	functions.
	* tls/handshake/message/x-check_chello.c (setup_tls): Initialize
	variables to control stub functions.
	* tls/handshake/message/x-check_chello.c (tls_hs_sighash_write)
	(tls_hs_ecc_write_elliptic_curves, tls_hs_ecc_write_ec_point_formats):
	Implement stub functions.
	* tls/handshake/message/x-check_chello.c
	(tls_hs_sighash_cert_write, tls_hs_supported_versions_write)
	(tls_hs_keyshare_write, tls_hs_servername_write, tls_hs_cookie_write):
	New stub functions.

	* tls/handshake/message/x-check_chello.c: Add data structures for test.
	* tls/handshake/message/x-check_chello.c: Add variables to control stub
	functions.
	* tls/handshake/message/x-check_chello.c (setup_tls): Initialize
	variables to control stub functions.
	* tls/handshake/message/x-check_chello.c
	(tls_util_get_epochtime, tls_util_get_random, tls_cipher_supported_list)
	(tls_util_check_version_in_supported_version, tls_hs_msg_write_1)
	(tls_hs_msg_write_2, tls_hs_msg_write_n, tls_hs_msg_init): Implement
	stub functions.
	* tls/handshake/message/x-check_chello.c (tls_hs_check_state): New stub
	function.

	* tls/handshake/message/x-check_shello.c
	(test_read_ext_list_normal_supported_versions)
	(test_read_ext_list_normal_key_share)
	(test_read_ext_list_failure_multiple_supported_versions)
	(test_read_ext_list_failure_multiple_key_share)
	(test_read_ext_list_failure_keyshare_read): New test cases.
	* tls/handshake/message/x-check_shello.c (read_ext_list_suite): Add new
	test cases.

	* tls/handshake/message/x-check_shello.c
	(test_read_ext_list_normal_server_name)
	(test_read_ext_list_failure_multiple_server_name)
	(test_read_ext_list_failure_multiple_ec_point_formats)
	(test_read_ext_list_failure_servername_read): New test cases.
	* tls/handshake/message/x-check_shello.c
	(read_ext_list_suite): Add new test cases.

	* tls/handshake/message/x-check_shello.c
	(test_write_extension_shello_failure_write_2): New test case.
	* tls/handshake/message/x-check_shello.c (write_extension_shello_suite):
	Add new test case.

	* tls/handshake/message/x-check_shello.c: Add data structures for test.
	* tls/handshake/message/x-check_shello.c
	(test_write_server_random_normal_tls11)
	(test_read_server_random_failure_downgrade_tls12)
	(test_read_server_random_failure_downgrade_tls11): New test cases.
	* tls/handshake/message/x-check_shello.c
	(read_server_random_suite): Add new test cases.

	* tls/handshake/message/x-check_shello.c: Rename data structure.
	* tls/handshake/message/x-check_shello.c: Add data structure for test.
	* tls/handshake/message/x-check_shello.c
	(test_write_version_normal_tls13)
	(test_write_version_failure_tls13_msg_write_2)
	(test_write_server_random_normal_tls13)
	(test_write_session_id_normal_tls13)
	(test_write_extension_shello_normal_tls13)
	(test_write_extension_shello_failure_tls13_supported_versions_write)
	(test_tls_hs_shello_compose_normal_tls13)
	(test_read_version_normal_tls13, test_read_server_random_normal_tls13)
	(test_read_session_id_normal_tls13_len0)
	(test_read_session_id_normal_tls13_len32)
	(test_tls_hs_extension_parse_normal_tls13)
	(test_tls_hs_shello_parse_normal_tls13)
	(test_interpret_server_random_normal_tls13)
	(test_interpret_session_id_normal_tls13)
	(test_interpret_ext_list_normal_tls13)
	(test_interpret_ext_list_failure_tls13_unsupported_extension)
	(test_interpret_ext_list_failure_tls13_read_ext_list)
	(test_tls_hs_shello_interpret_normal_tls13): New test cases.
	* tls/handshake/message/x-check_shello.c
	(write_version_suite, write_server_random_suite, write_session_id_suite)
	(write_extension_shello_suite, tls_hs_shello_compose_suite)
	(read_version_suite, read_server_random_suite, read_session_id_suite)
	(tls_hs_extension_parse_suite, tls_hs_shello_parse_suite)
	(interpret_server_random_suite, interpret_session_id_suite)
	(interpret_ext_list_suite, tls_hs_shello_interpret_suite): Add new test
	cases.
	* tls/handshake/message/x-check_shello.c
	(test_write_extension_shello_normal_tls12)
	(test_tls_hs_shello_compose_normal_tls12): Use renamed data structure.

	* tls/handshake/message/x-check_shello.c: Add variables to control stub
	functions.
	* tls/handshake/message/x-check_shello.c: Add data structure for test.
	* tls/handshake/message/x-check_shello.c (setup_client, setup_server):
	Initialize variables to control stub functions.
	* tls/handshake/message/x-check_shello.c
	(tls_hs_supported_versions_write, tls_hs_keyshare_write)
	(tls_hs_keyshare_read): Implement stub functions.
	* tls/handshake/message/x-check_shello.c
	(test_write_extension_shello_normal_tls12)
	(test_write_extension_shello_normal_write_length_0)
	(test_tls_hs_shello_compose_normal_tls12): Change stub function
	behavior.

	* tls/handshake/message/x-check_shello.c
	(test_check_ext_availability_tls13_shello_normal)
	(test_check_ext_availability_tls13_shello_failure): New test cases.
	* tls/handshake/message/x-check_shello.c
	(check_ext_availability_tls13_shello_suite): New test suites.
	* tls/handshake/message/x-check_shello.c (main): Add new test suites.

	* tls/handshake/message/x-check_shello.c: Add TLS 1.3 server hello
	message for test.

	* tls/handshake/message/x-check_shello.c
	(test_interpret_server_random_normal_tls12): New test case.
	* tls/handshake/message/x-check_shello.c
	(interpret_server_random_suite): New test suite.
	* tls/handshake/message/x-check_shello.c (main): Add new test suite.

	* tls/handshake/message/x-check_shello.c
	(test_tls_hs_shello_compose_normal_tls12)
	(test_read_ext_list_normal_ec_point_formats)
	(test_read_ext_list_failure_ecc_read_point_format)
	(test_interpret_session_id_normal_tls12)
	(test_interpret_session_id_normal_tls12_same_session_id)
	(test_interpret_session_id_normal_tls12_different_session_id_len)
	(test_interpret_session_id_normal_tls12_different_session_id_value): Add
	test items.
	* tls/handshake/message/x-check_shello.c
	(test_tls_hs_shello_parse_failure_read_whole_message): Fix style.

	* tls/handshake/message/x-check_shello.c (setup_client, setup_server):
	Set initial state in setup.

	* tls/handshake/message/x-check_shello.c: Update TLS 1.2 server hello
	message for test.
	* tls/handshake/message/x-check_shello.c
	(test_tls_hs_extension_parse_normal_tls12): Update test items.

	* tls/handshake/message/x-check_shello.c
	(test_read_version_normal_tls12, test_read_server_random_normal_tls12)
	(test_read_session_id_normal_tls12)
	(test_read_ext_list_normal_ec_point_formats)
	(test_read_ext_list_failure_ecc_read_point_format)
	(test_read_ext_list_failure_elliptic_curves)
	(test_read_ext_list_failure_signature_algo)
	(test_tls_hs_extension_parse_normal_tls12)
	(test_tls_hs_shello_parse_normal_tls12): Use sizeof() instead of setting
	message length by value.

	* tls/handshake/message/x-check_shello.c: Fix comment in data structure.
	* tls/handshake/message/x-check_shello.c
	(test_read_ext_list_normal_ec_point_formats)
	(test_read_ext_list_failure_ecc_read_point_format)
	(test_read_ext_list_failure_elliptic_curves)
	(test_read_ext_list_failure_signature_algo): Fix wrong offset.

	* tls/handshake/message/x-check_chello.c
	(test_read_cmp_method_normal, test_interpret_cmp_method_normal)
	(test_interpret_ext_list_normal_tls12)
	(test_tls_hs_chello_interpret_normal_tls12): Add test items.

	* tls/handshake/message/x-check_chello.c: Add variables to control stub
	functions.
	* tls/handshake/message/x-check_chello.c: Add data structure for test.
	* tls/handshake/message/x-check_chello.c (setup_tls): Initialize
	variables to control stub functions.
	* tls/handshake/message/x-check_chello.c
	(tls_cipher_list_free, tls_cipher_list_alloc): Refine stub functions.

	* tls/handshake/message/x-check_chello.c
	(test_tls_hs_chello_parse_normal_tls12): merge
	test_tls_hs_chello_parse_normal() to this.
	* tls/handshake/message/x-check_chello.c
	(test_tls_hs_chello_parse_normal): Remove function.
	* tls/handshake/message/x-check_chello.c (tls_hs_chello_parse_suite):
	Remove test case.

	* tls/handshake/message/x-check_shello.c: Add data structure for test.
	* tls/handshake/message/x-check_shello.c
	(test_write_server_random_normal_tls12): Adapt TLS 1.3 downgrade
	protection.

	* tls/handshake/message/x-check_shello.c: Add data structures for test.
	* tls/handshake/message/x-check_shello.c: Add variables to control stub
	functions.
	* tls/handshake/message/x-check_shello.c (setup_client, setup_server):
	Initialize variables to control stub functions.
	* tls/handshake/message/x-check_shello.c
	(test_write_extension_shello_normal_tls12)
	(test_write_extension_shello_normal_write_length_0)
	(test_tls_hs_shello_compose_normal_tls12): Fix effect of stub
	implementation.
	* tls/handshake/message/x-check_shello.c
	(tls_hs_ecc_write_ec_point_formats, tls_hs_servername_write)
	(tls_hs_servername_read): Implement stub functions.

	* tls/handshake/message/x-check_shello.c: Add variables for version
	independent test message.
	* tls/handshake/message/x-check_shello.c (setup): Initialize
	variables for version independent test message.
	* tls/handshake/message/x-check_shello.c
	(test_read_version_failure_invalid_record_length)
	(test_read_server_random_failure_invalid_record_length)
	(test_read_session_id_failure_invalid_record_length_1)
	(test_read_session_id_failure_invalid_record_length_2)
	(test_read_cipher_suite_normal)
	(test_read_cipher_suite_failure_invalid_record_length)
	(test_read_cmp_method_normal)
	(test_read_cmp_method_failure_invalid_record_length)
	(test_tls_hs_shello_parse_failure_read_version)
	(test_tls_hs_shello_parse_failure_read_server_random)
	(test_tls_hs_shello_parse_failure_read_session_id)
	(test_tls_hs_shello_parse_failure_read_cipher_suite)
	(test_tls_hs_shello_parse_failure_read_cmp_method)
	(test_tls_hs_shello_parse_failure_tls_hs_extension_parse)
	(test_tls_hs_shello_parse_failure_read_whole_message)
	(test_interpret_cipher_suite_normal)
	(test_interpret_cipher_suite_failure_cipher_set)
	(test_interpret_cmp_method_normal)
	(test_interpret_cmp_method_failure_compress_set): Use server hello
	message for version independent test.

	* tls/handshake/message/x-check_shello.c
	(test_write_session_id_normal_tls12_ressesion_0): Change function order.

	* tls/handshake/message/x-check_shello.c
	(setup_client, test_write_version_normal_tls12)
	(test_write_version_failure_tls12_msg_write_major)
	(test_write_version_failure_tls12_msg_write_minor)
	(test_tls_hs_shello_compose_failure_write_cmp_method)
	(test_interpret_ext_list_normal_tls12)
	(test_interpret_ext_list_failure_tls12_unsupported_extension)
	(test_interpret_ext_list_failure_tls12_read_ext_list)
	(test_tls_hs_shello_interpret_normal_tls12)
	(test_tls_hs_shello_interpret_failure_read_ext_list):
	Switch version representation to TLS 1.3 unsigned two byte version.
	* tls/handshake/message/x-check_shello.c
	(test_write_session_id_normal_tls12)
	(test_write_session_id_failure_tls12_get_random)
	(test_write_session_id_normal_tls12_ressesion_32)
	(test_write_session_id_normal_tls12_ressesion_0)
	(test_tls_hs_shello_compose_failure_write_version)
	(test_tls_hs_shello_compose_failure_write_server_random)
	(test_tls_hs_shello_compose_failure_write_session_id)
	(test_tls_hs_shello_compose_failure_write_cipher_suite)
	(test_tls_hs_shello_compose_failure_write_extension)
	(test_interpret_session_id_normal_tls12)
	(test_interpret_session_id_normal_tls12_same_session_id)
	(test_interpret_session_id_normal_tls12_different_session_id_len)
	(test_interpret_session_id_normal_tls12_different_session_id_value)
	(test_interpret_session_id_failure_tls12_get_session): Add version
	specification.
	* tls/handshake/message/x-check_shello.c
	(tls_util_convert_ver_to_protover): New stub function.

	* tls/handshake/message/x-check_shello.c
	(test_check_ext_availability_tls12_normal)
	(test_check_ext_availability_tls12_failure): New functions.
	* tls/handshake/message/x-check_shello.c
	(test_check_ext_availability_tls12_failure_elliptic_curves)
	(test_check_ext_availability_tls12_normal_ec_point_formats)
	(test_check_ext_availability_tls12_failure_signature_algo): Remove
	functions.
	* tls/handshake/message/x-check_shello.c
	(check_ext_availability_tls12_suite): Call new test cases.

	* tls/handshake/message/x-check_shello.c: Rename TLS 1.2 server hello
	message variable.
	* tls/handshake/message/x-check_shello.c
	(test_read_version_normal_tls12)
	(test_read_version_failure_invalid_record_length)
	(test_read_server_random_normal_tls12)
	(test_read_server_random_failure_invalid_record_length)
	(test_read_session_id_normal_tls12)
	(test_read_session_id_failure_invalid_record_length_1)
	(test_read_session_id_failure_invalid_record_length_2)
	(test_read_cipher_suite_normal)
	(test_read_cipher_suite_failure_invalid_record_length)
	(test_read_cmp_method_normal)
	(test_read_cmp_method_failure_invalid_record_length)
	(test_read_ext_list_normal_ec_point_formats)
	(test_read_ext_list_failure_ecc_read_point_format)
	(test_read_ext_list_failure_elliptic_curves)
	(test_read_ext_list_failure_signature_algo)
	(test_tls_hs_extension_parse_normal_tls12)
	(test_tls_hs_extension_parse_normal_no_extension)
	(test_tls_hs_extension_parse_failure_invalid_record_length_1)
	(test_tls_hs_extension_parse_failure_invalid_record_length_2)
	(test_tls_hs_shello_parse_normal_tls12)
	(test_tls_hs_shello_parse_failure_read_version)
	(test_tls_hs_shello_parse_failure_read_server_random)
	(test_tls_hs_shello_parse_failure_read_session_id)
	(test_tls_hs_shello_parse_failure_read_cipher_suite)
	(test_tls_hs_shello_parse_failure_read_cmp_method)
	(test_tls_hs_shello_parse_failure_tls_hs_extension_parse)
	(test_tls_hs_shello_parse_failure_read_whole_message)
	(test_interpret_session_id_normal_tls12)
	(test_interpret_session_id_normal_tls12_same_session_id)
	(test_interpret_session_id_normal_tls12_different_session_id_len)
	(test_interpret_session_id_normal_tls12_different_session_id_value)
	(test_interpret_session_id_failure_tls12_get_session)
	(test_interpret_cipher_suite_normal)
	(test_interpret_cipher_suite_failure_cipher_set)
	(test_interpret_cmp_method_normal)
	(test_interpret_cmp_method_failure_compress_set)
	(test_interpret_ext_list_normal_tls12)
	(test_interpret_ext_list_failure_tls12_read_ext_list)
	(test_tls_hs_shello_interpret_normal_tls12)
	(test_tls_hs_shello_interpret_failure_session_id)
	(test_tls_hs_shello_interpret_failure_failure_cipher_set)
	(test_tls_hs_shello_interpret_failure_compress_set)
	(test_tls_hs_shello_interpret_failure_read_ext_list): Use renamed
	TLS 1.2 server hello message.

	* tls/handshake/message/x-check_shello.c
	(test_write_version_normal_tls12)
	(test_write_version_failure_tls12_msg_write_major)
	(test_write_version_failure_tls12_msg_write_minor)
	(test_write_server_random_normal_tls12)
	(test_write_session_id_normal_tls12)
	(test_write_session_id_failure_tls12_get_random)
	(test_write_session_id_normal_tls12_ressesion_32)
	(test_write_session_id_normal_tls12_ressesion_0)
	(test_write_session_id_failure_tls12_get_random)
	(test_write_extension_shello_normal_tls12)
	(test_write_extension_shello_failure_write_2)
	(test_write_extension_shello_failure_tls12_write_ec_point_formats)
	(test_write_extension_shello_normal_write_length_0)
	(write_extension_shello_suite)
	(test_tls_hs_shello_compose_normal_tls12)
	(test_read_server_random_normal_tls12)
	(test_read_session_id_normal_tls12)
	(test_tls_hs_extension_parse_normal_tls12)
	(test_tls_hs_shello_parse_normal_tls12)
	(test_interpret_session_id_normal_tls12)
	(test_interpret_session_id_normal_tls12_same_session_id)
	(test_interpret_session_id_normal_tls12_different_session_id_len)
	(test_interpret_session_id_normal_tls12_different_session_id_value)
	(test_interpret_session_id_failure_tls12_get_session)
	(test_interpret_ext_list_normal_tls12)
	(test_interpret_ext_list_failure_tls12_unsupported_extension)
	(test_interpret_ext_list_failure_tls12_read_ext_list)
	(test_tls_hs_shello_interpret_normal_tls12): Renamed from function
	without '_tls12' and/or '_shello' phrase.
	* tls/handshake/message/x-check_shello.c (write_version_suite)
	(write_server_random_suite, write_session_id_suite)
	(write_extension_shello_suite, tls_hs_shello_compose_suite)
	(read_server_random_suite, read_session_id_suite)
	(tls_hs_extension_parse_suite, tls_hs_shello_parse_suite)
	(interpret_session_id_suite, test_interpret_ext_list_normal_tls12)
	(tls_hs_shello_interpret_suite, main): Call renamed function.

	* tls/handshake/message/x-check_chello.c: Add data structures for test.
	* tls/handshake/message/x-check_chello.c: Add variables to control stub
	functions.
	* tls/handshake/message/x-check_chello.c (setup_tls): Initialize
	variables to control stub functions.
	* tls/handshake/message/x-check_chello.c (tls_hs_sighash_read)
	(tls_hs_sighash_cert_read): Refine stub functions.

	* tls/handshake/message/x-check_chello.c
	(test_tls_hs_chello_parse_normal_tls13)
	(test_interpret_session_id_normal_tls13_new_session)
	(test_interpret_session_id_failure_tls13_seslen)
	(test_interpret_session_id_failure_tls13_get_session)
	(test_interpret_ext_list_normal_tls13)
	(test_interpret_ext_list_failure_tls13_elliptic_curves)
	(test_interpret_ext_list_failure_tls13_ext_signature_algo)
	(test_interpret_ext_list_failure_tls13_servername)
	(test_interpret_ext_list_failure_tls13_keyshare)
	(test_tls_hs_chello_interpret_normal_tls13): New test cases.
	* tls/handshake/message/x-check_chello.c
	(tls_hs_chello_parse_suite, interpret_session_id_suite)
	(interpret_ext_list_suite, tls_hs_chello_interpret_suite): Add new test
	cases.

	* tls/handshake/message/x-check_chello.c: Add TLS 1.3 client hello
	message for test.

	* tls/handshake/message/x-check_chello.c: Rename macro
	CH_SESSIONID_LENGTH_0 from CH_SESSIONID.

	* tls/handshake/message/x-check_chello.c
	(test_read_client_version_normal_tls12)
	(test_interpret_ext_list_normal_tls12)
	(test_interpret_ext_list_failure_tls12_elliptic_curves)
	(test_interpret_ext_list_failure_tls12_ec_point_formats)
	(test_interpret_ext_list_failure_tls12_ext_signature_algo)
	(test_tls_hs_chello_interpret_normal_tls12)
	(test_tls_hs_chello_interpret_failure_interpret_ext_list)
	(test_tls_hs_chello_interpret_failure_sighash_save_default):
	Switch version representation to TLS 1.3 unsigned two byte version.
	* tls/handshake/message/x-check_chello.c
	(test_interpret_session_id_normal_tls12_new_session)
	(test_interpret_session_id_normal_tls12_resession)
	(test_interpret_session_id_failure_tls12_get_session): Add version
	specification.
	* tls/handshake/message/x-check_chello.c
	(tls_util_convert_ver_to_protover): New stub function.

	* tls/handshake/message/x-check_chello.c: Add variables to control stub
	functions.
	* tls/handshake/message/x-check_chello.c (setup_tls): Initialize
	variables to control stub functions.
	* tls/handshake/message/x-check_chello.c (tls_hs_keyshare_read)
	(tls_hs_servername_read): Refine stub functions.

	* tls/handshake/message/x-check_chello.c
	(test_interpret_session_id_normal_tls12_new_session)
	(test_interpret_session_id_normal_tls12_resession)
	(test_interpret_session_id_failure_tls12_get_session)
	(test_interpret_ext_list_normal_tls12)
	(test_interpret_ext_list_failure_tls12_elliptic_curves)
	(test_interpret_ext_list_failure_tls12_ec_point_formats)
	(test_interpret_ext_list_failure_tls12_ext_signature_algo)
	(test_tls_hs_chello_interpret_normal_tls12): Renamed from functions
	without '_tls12' phrase.
	* tls/handshake/message/x-check_chello.c
	(interpret_session_id_suite, interpret_ext_list_suite)
	(tls_hs_chello_interpret_suite): Call new functions.

	* tls/handshake/message/x-check_chello.c
	(test_check_ext_availability_tls12_normal)
	(test_check_ext_availability_tls12_failure)
	(test_check_ext_availability_tls13_normal)
	(test_check_ext_availability_tls13_failure): New test cases.
	* tls/handshake/message/x-check_chello.c
	(check_ext_availability_tls12_suite)
	(check_ext_availability_tls13_suite): New test suites.
	* tls/handshake/message/x-check_chello.c (main): Add new test suites.

	* tls/handshake/message/x-check_chello.c: Make comments neat.
	* tls/handshake/message/x-check_chello.c (interpret_session_id_suite)
	(interpret_cmp_method_suite): Ditto.
	* tls/handshake/message/x-check_shello.c: Ditto.
	* tls/handshake/message/x-check_shello.c
	(test_write_extension_failure_write_ec_point_formats)
	(test_interpret_cipher_suite_normal): Ditto.

2019-03-26  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/client-server/x-check_client.c
	(test_establish_protocol_version_failure_protocol_version_major)
	(test_establish_protocol_version_failure_protocol_version_minor): Fix
	OK_set_error() location and point.
	* tls/handshake/client-server/x-check_server.c
	(test_establish_protocol_version_failure_tls11): Ditto.
	* tls/handshake/message/x-check_chello.c
	(test_interpret_cmp_method_failure_unknown_method): Ditto.

	* tls/handshake/message/certreq.c (write_certreq_tls13): Fix incorrect
	return value.
	* tls/tls_cert.c (tls_cert_info_available): Ditto.

	* tls/handshake/client-server/client.c (do_phase_hello): Fix incorrect
	error handling.
	* tls/handshake/message/encext.c (tls_hs_encext_compose): Ditto.

	* tls/handshake/message/skeyexc.c (tls_hs_skeyexc_parse): Fix incorrect
	OK_set_error() point.

	* aicrypto/ok_err.h: Add OK_set_error() location, point and state
	regarding tls module.
	* tls/handshake/client-server/client.c (establish_protocol_version)
	(select_key_exchange_method, compare_server_hellos)
	(read_certificate_up_to_tls12, read_certificate_tls13)
	(read_server_key_exchange_up_to_tls12)
	(read_certificate_request_up_to_tls12, read_certificate_request_tls13)
	(read_certificate_verify_tls13, read_finished_tls13, do_phase_hello)
	(do_phase_recv_cert_tls13, do_phase_recv_cert, do_phase_send_cert):
	Notify error by OK_set_error().
	* tls/handshake/client-server/server.c (select_key_exchange_method)
	(establish_protocol_version, compare_client_hellos)
	(interpret_2ndclient_hello, do_phase_hello, do_phase_send_cert)
	(do_phase_recv_cert): Ditto.
	* tls/handshake/ecdh/ecdh.c (write_curve_params, read_curve_params)
	(calc_x25519_shared_secret, calc_x448_shared_secret)
	(tls_hs_ecdh_calc_shared_secret): Ditto.
	* tls/handshake/ecdh/ecdhkey.c (validate_ecdsa_pubkey)
	(tls_hs_ecdhkey_gen_for_server, tls_hs_ecdhkey_gen_for_client)
	(tls_hs_ecdhkey_set_to_ecpoint, tls_hs_ecdhkey_set_peer_pubkey): Ditto.
	* tls/handshake/extension/cookie.c (alloc_cookie, read_cookie_in_hrr)
	(tls_hs_cookie_write, tls_hs_cookie_read): Ditto.
	* tls/handshake/extension/ecc.c (compose_eclist, save_eclist)
	(save_peer_eclist, save_pflist): Ditto.
	* tls/handshake/extension/keyshare.c (write_keyshare_for_shello)
	(read_keyshare_in_chello, read_keyshare_in_shello, read_keyshare_in_hrr)
	(tls_hs_keyshare_init, tls_hs_keyshare_write, tls_hs_keyshare_read):
	Ditto.
	* tls/handshake/extension/parse.c (tls_hs_extension_parse): Ditto.
	* tls/handshake/extension/servername.c (check_hostname, read_hostname)
	(read_server_name_by_server, read_server_name_by_client)
	(tls_hs_servername_write, tls_hs_servername_read): Ditto.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_list)
	(tls_hs_sighash_list_cert, tls_hs_sighash_get_ai_hash_type_by_ss)
	(tls_hs_sighash_get_ai_hash_type, tls_hs_sighash_get_ai_sig_type_by_ss)
	(tls_hs_sighash_get_hash_type, tls_hs_sighash_read)
	(tls_hs_sighash_cert_read, tls_hs_sighash_save_default): Ditto.
	* tls/handshake/extension/supported_versions.c
	(read_supported_versions_in_chello, read_supported_versions_in_shello)
	(tls_hs_supported_versions_write, tls_hs_supported_versions_read):
	Ditto.
	* tls/handshake/message/cert.c (check_certchain_produced_by_sighash)
	(is_compatible_with_sighash, read_ext_list, interpret_ext_list)
	(write_certchain_tls13, write_certchain_tls13, read_certchain_tls13)
	(write_scert, write_ccert, read_ccert): Ditto.
	* tls/handshake/message/certreq.c (read_cert_authorities)
	(write_ext_cert_authorities, interpret_ext_list, write_certreq_tls13)
	(read_certreq_tls13, read_certreq): Ditto.
	* tls/handshake/message/certvfy.c (write_certvfy_tls13, write_certvfy)
	(read_certvfy_tls13, read_certvfy): Ditto.
	* tls/handshake/message/chello.c (read_session_id, read_cipher_suite)
	(read_cmp_method, read_ext_list, interpret_session_id_tls13)
	(interpret_cmp_method, interpret_ext_list, tls_hs_chello_interpret):
	Ditto.
	* tls/handshake/message/encext.c (read_ext_list, tls_hs_encext_parse):
	Ditto.
	* tls/handshake/message/finished.c (get_label, write_verify_data)
	(read_verify_data_tls13, read_verify_data): Ditto.
	* tls/handshake/message/keyupdate.c (read_keyupdate)
	(tls_hs_keyupdate_parse): Ditto.
	* tls/handshake/message/shello.c (read_server_random, read_session_id)
	(read_cmp_method, interpret_server_random, interpret_session_id_tls13):
	Ditto.
	* tls/tls.c (copy_certs): Ditto.
	* tls/tls_alert.c (recv_alert_tls13, tls_alert_send, tls_alert_recv):
	Ditto.
	* tls/tls_ccs.c (tls_ccs_recv): Ditto.
	* tls/tls_cert.c (tls_cert_type_list)
	(tls_cert_info_can_use_ecc_cipher_suite, tls_cert_info_available)
	(TLS_set_server_name, TLS_get_server_name): Ditto.
	* tls/tls_cipher.c (cipher_suite_decided, tls_cipher_select)
	(tls_cipher_supported_list, tls_cipher_hashalgo, tls_cipher_set_tls13)
	(tls_cipher_set): Ditto.
	* tls/tls_digitally_signed.c (search_sigscheme_in_sighash)
	(check_cert, write_digitally_signed_hash_tls13)
	(read_digitally_signed_hash_tls13, tls_digitally_signed_write_hash)
	(tls_digitally_signed_read_hash): Ditto.
	* tls/tls_handshake.c (posthandshake_message_tls13)
	(tls_extension_init, tls_hs_interim_params_init)
	(tls_hs_posthandshake_message): Ditto.
	* tls/tls_key.c (make_aicrypto_key, compose_hkdf_label, derive_secret)
	(tls_key_derive_early_secret, tls_key_derive_handshake_secret)
	(tls_key_derive_handshake_traffic_secrets)
	(tls_key_derive_application_traffic_secret)
	(tls_key_derive_application_traffic_secrets)
	(tls_key_derive_application_traffic_secret_n): Ditto.
	* tls/tls_mac.c (tls_aad_generate): Ditto.
	* tls/tls_record.c (get_record_tls13_encrypted, tls_record_free)
	(tls_record_read, tls_record_write, TLS_write): Ditto.
	* tool/error.c (get_err_location, get_err_type): Add notification string
	related to OK_set_error() location and state.

	* aicrypto/ok_err.h: Add OK_set_error() location, point and state
	regarding edc module.
	* edc/edc.c: Add header inclusion.
	* edc/edc.c (X25519_derive, X25519_generate_shared_secret, X448_derive)
	(X448_generate_shared_secret): Notify error by OK_set_error().
	* edc/edc_key.c: Add header inclusion.
	* edc/edc_key.c (X25519pubkey_new, X25519prvkey_new, X25519key_free)
	(X25519prv_2pub, X448pubkey_new, X448prvkey_new, X448key_free)
	(X25519prv_2pub): Notify error by OK_set_error().
	* tool/error.c (get_err_location, get_err_type): Add notification string
	related to OK_set_error() location and state.

	* aicrypto/ok_err.h: Add OK_set_error() location regarding chacha
	module.

	* tls/handshake/client-server/server.c (select_key_exchange_method):
	Put error handling in order.
	* tls/handshake/extension/keyshare.c (read_keyshare_in_hrr): Ditto.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_read): Ditto.
	* tls/handshake/message/chello.c (interpret_ext_list): Ditto.
	* tls/tls_digitally_signed.c (read_digitally_signed_hash_tls12): Ditto.
	* tls/tls_handshake.c (tls_handshake_read): Ditto.
	* tls/tls_session.c (tls_session_free): Ditto.

2019-03-19  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/test/client.c (do_key_update): Fix architecture dependent
	printf output.

2019-03-13  OHASHI Hiroki  <hiroki@soum.co.jp>

	* README.en: Support TLS 1.3.
	* README.ja: Ditto.

	* x509/key.c (Key_free): Add branches to call X448 key function.
	* x509/key_tool.c (Key_dup): Ditto.

	* x509/key.c (Key_free): Add branches to call X25519 key function.
	* x509/key_tool.c (Key_dup): Ditto.

	* tls/handshake/extension/keyshare.c (read_keyshare_in_chello): Fix
	segmentation fault. [#419]

	* tls/tls_cipher.c: Disable forbidden algorithms.

	* tls/handshake/extension/ecc.c: Disable forbidden algorithms.

	* tls/handshake/extension/sighash.c: Disable forbidden algorithms.

	* tls/handshake/client-server/client.c
	(tls_key_derive_application_traffic_secret): Modify interface.
	* tls/handshake/client-server/client.c (derive_application_secrets):
	Remove function.
	* tls/handshake/client-server/client.c (do_phase_recv_cert_tls13):
	Derive master secret, application traffic secret and traffic key.
	* tls/handshake/client-server/client.c (do_phase_final_tls13):
	Derive traffic key.
	* tls/handshake/client-server/server.c
	(tls_key_derive_handshake_traffic_secrets): Modify interface.
	* tls/handshake/client-server/server.c (derive_application_secrets):
	Remove function.
	* tls/handshake/client-server/server.c (do_phase_send_cert_tls13):
	Derive master secret, application traffic secret and traffic key.
	* tls/handshake/client-server/server.c (do_phase_final_tls13):
	Derive traffic key.

	* tls/tls_key.c (tls_key_derive_application_traffic_secret): New
	function.

	* tls/handshake/client-server/client.c (write_client_hello)
	(write_certificate_up_to_tls12, write_certificate_verify_up_to_tls12)
	(write_client_key_exchange_up_to_tls12)
	(write_finished_tls13): Fix memory leak on error. [#436]
	* tls/handshake/client-server/finale.c (write_finished): Ditto.
	* tls/handshake/client-server/server.c (write_server_hello)
	(write_encrypted_extensions_tls13, write_certificate_up_to_tls12)
	(write_certificate_verify_tls13, write_server_key_exchange_up_to_tls12)
	(write_certificate_request_up_to_tls12)
	(write_server_hello_done_up_to_tls12, write_finished_tls13): Ditto.
	* tls/include/tls_handshake.h: Add comment.

	* tls/cipher/aead.c (tls_decipher_aead): Add comment.
	* tls/handshake/client-server/client.c (establish_protocol_version)
	(write_certificate_verify_up_to_tls12, write_certificate_verify_tls13)
	(write_finished_tls13, do_phase_send_cert_tls13): Ditto.
	* tls/handshake/client-server/server.c (establish_protocol_version)
	(write_certificate_tls13, do_phase_hello, do_phase_send_cert_tls13):
	Ditto.
	* tls/handshake/extension/keyshare.c (write_keyshare_for_shello): Ditto.
	* tls/handshake/message/cert.c (read_ext_list, write_certchain_tls13)
	(read_certchain_tls13): Ditto.
	* tls/handshake/message/certreq.c (read_ext_list, tls_hs_certreq_parse):
	Ditto.
	* tls/handshake/message/chello.c (read_ext_list, interpret_ext_list)
	(tls_hs_chello_parse): Ditto.
	* tls/handshake/message/encext.c (read_ext_list): Ditto.
	* tls/handshake/message/finished.c (read_verify_data_tls13): Ditto.
	* tls/handshake/message/shello.c (check_ext_availability_tls13_shello)
	(check_ext_availability_tls13_hrr, write_version, read_ext_list)
	(interpret_server_random, interpret_session_id_tls13)
	(interpret_cipher_suite, tls_hs_shello_parse): Ditto.
	* tls/tls_ccs.c (tls_ccs_recv): Ditto.
	* tls/tls_key.c (tls_key_make_traffic_key): Ditto.
	* tls/tls_record.c (get_record_up_to_tls12, get_record_tls13_encrypted)
	(read_fragments, write_record_version, compose_record_tls13): Ditto.

	* tls/handshake/message/chello.c (interpret_cmp_method): Add list length
	check.

	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_set_peer_pubkey): Fix
	memory leak. [#435]

	* tls/handshake/ecdh/ecdhkey.c (ecdsakey_generate)
	(set_peer_ecdsa_pubkey): Call validate_ecdsa_pubkey().

	* tls/handshake/ecdh/ecdhkey.c (validate_ecdsa_pubkey): New function.

	* tls/tls_alert.c (recv_alert_tls13): New function.
	* tls/tls_alert.c (tls_alert_recv): Add branch to call new function.

	* tls/tls_alert.c (recv_alert_up_to_tls12): Renamed from
	tls_alert_recv().
	* tls/tls_alert.c (tls_alert_recv): New function.

	* tls/tls_alert.c (send_alert_tls13): New function.
	* tls/tls_alert.c (tls_alert_send): Add branch to call new function.

	* tls/tls_alert.c (send_alert_up_to_tls12): Renamed from
	tls_alert_send().
	* tls/tls_alert.c (tls_alert_send): New function.

	* tls/include/tls.h: Add variable storing connection close flag to tls
	structure.
	* tls/tls.c (init_cipher_param): Initialize connection close flag.
	* tls/tls.c (free_cipher_param): Finalize connection close flag.
	* tls/tls_alert.c (tls_alert_send, tls_alert_recv): Stop sending or
	receiving when connection flag is true.
	* tls/tls_record.c (tls_record_read, tls_record_read, TLS_read)
	(TLS_write): Stop sending or receiving when connection flag is true.

	* tls/tls_alert.c (get_alert_level_tls13): New function.

	* tls/tls_alert.c (send_alert_record): Renamed from send_alert().
	* tls/tls_alert.c (tls_alert_send): Call renamed function.

	* tls/handshake/message/encext.c (interpret_ext_list): Fix alert type.

	* tls/include/tls_record.h: Add new macro
	TLS_RECORD_SEQNUM_SIZE_MAX_TLS13.
	* tls/tls_record.c (TLS_read, TLS_write): Adapt wrap.

	* tls/include/tls_record.h: Add new macro
	TLS_AEAD_RECORD_LIMIT_AES_GCM.
	* tls/tls_record.c (TLS_read, TLS_write): Add safety limit of AES-GCM
	on record encryption.

	* tls/Makefile.am: Add include path for test client.
	* tls/test/client.c (do_key_update): New function.
	* tls/test/client.c (run_client, main): Add KeyUpdate test mode.

	* tls/tls_handshake.c (start_handshake): Defer session information
	cleanup.

	* tls/tls.c (free_session): New function.
	* tls/tls.c (free_cipher_param, free_certs, free_interim_params)
	(tls_free_connection, TLS_free): Free variables in tls structure.

	* tls/tls_handshake.c (tls_handshake_free): New function.
	* tls/include/tls_handshake.h: Add prototype of new function.

	* tls/tls_handshake.c (posthandshake_message_tls13): Implement KeyUpdate
	message response.

	* tls/tls_handshake.c (tls_hs_send_key_update): New function.
	* tls/include/tls_handshake.h: Add prototype of new function.

	* tls/Makefile.am: Add KeyUpdate message source file.
	* tls/handshake/message/keyupdate.c: New file.
	* tls/include/tls.h: Add variable storing flag that sends KeyUpdate
	message.
	* tls/include/tls_handshake.h: Add KeyUpdate type symbols. Add prototype
	of new functions.

	* tls/tls_key.c (tls_key_derive_application_traffic_secret_n): New
	function.

	* tls/test/client.c (run_client): Send server_name extension.

	* tls/handshake/client-server/client.c (select_key_exchange_method):
	Adapt HelloRetryRequest.
	* tls/handshake/client-server/client.c (do_phase_hello): Receive second
	ServerHello.

	* tls/handshake/client-server/client.c (interpret_2ndserver_hello): New
	function.

	* tls/handshake/client-server/client.c (compare_server_hellos): New
	function.

	* tls/handshake/client-server/client.c (search_extension):  New
	function.

	* tls/handshake/message/x-check_shello.c
	(tls_hs_chello_interpret_extensions, tls_hs_msghash_make): New stubs.
	* tls/handshake/message/x-check_shello.c (tls_hs_cookie_read): New stub.

	* tls/handshake/extension/keyshare.c (read_keyshare_in_shello): Adapt
	HelloRetryRequest.

	* tls/handshake/client-server/server.c (do_phase_hello): Receive second
	ClientHello.

	* tls/handshake/client-server/server.c (interpret_2ndclient_hello): New
	function.

	* tls/handshake/message/chello.c (interpret_ext_list): Defer extension
	queue cleanup.
	* tls/handshake/message/chello.c (tls_hs_chello_interpret_extensions):
	Add extension queue cleanup.

	* tls/handshake/message/chello.c (tls_hs_chello_interpret_extensions):
	New function.
	* tls/include/tls_handshake.h: Add prototype of new function.

	* tls/handshake/client-server/server.c (compare_client_hellos): New
	function.

	* tls/handshake/client-server/server.c (search_extension): New function.

	* tls/tls_record.c (get_record_tls13_encrypted): Stop record counter
	increment when receiving ChangeCipherSpec.

	* tls/handshake/client-server/server.c (do_phase_hello): Send
	HelloRetryRequest.

	* b/tls/handshake/client-server/server.c
	(replace_transcript_with_msghash): New function.

	* tls/handshake/message/shello.c (write_server_random): Adapt
	HelloRetryRequest.

	* tls/handshake/client-server/server.c (write_server_hello): Modify
	interface.
	* tls/handshake/client-server/server.c (do_phase_hello): Call
	write_server_hello() according to new interface.

	* tls/handshake/client-server/server.c (read_client_hello): Modify
	interface.
	* tls/handshake/client-server/server.c (do_phase_hello): Call
	read_client_hello() according to new interface.

	* tls/handshake/message/shello.c (write_extension_shello): Renamed from
	write_extension().
	* tls/handshake/message/shello.c (write_extension_hrr)
	(write_extension): New function.

	* tls/handshake/extension/keyshare.c (write_keyshare_for_hrr): New
	function.
	* tls/handshake/extension/keyshare.c (tls_hs_keyshare_write): Call new
	function.

	* tls/handshake/extension/keyshare.c (read_keyshare_in_chello): Modify
	comment.

	* tls/handshake/client-server/server.c (select_key_exchange_method)
	(interpret_client_hello): Adapt HelloRetryRequest.

	* tls/include/tls.h: Add variable storing first hello message to tls
	structure.

	* tls/handshake/client-server/client.c (interpret_server_hello)
	(do_phase_hello): Adapt HelloRetryRequest.

	* tls/handshake/message/chello.c (write_ext): Add comment.

	* tls/handshake/message/chello.c (write_ext): Call function to write
	cookie extension.

	* tls/handshake/client-server/client.c
	(replace_transcript_with_msghash): New function.

	* tls/handshake/client-server/client.c (write_client_hello): Modify
	interface.
	* tls/handshake/client-server/client.c (do_phase_hello): Call
	write_client_hello() according to new interface.

	* tls/handshake/message/chello.c (write_session_id): Adapt
	HelloRetryRequest.

	* tls/handshake/message/chello.c (write_client_random): Adapt
	HelloRetryRequest.

	* tls/handshake/message/chello.c (write_client_version): Adapt
	HelloRetryRequest.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_list)
	(tls_hs_sighash_list_cert): Adapt HelloRetryRequest.

	* tls/handshake/extension/keyshare.c (write_keyshare_for_2ndchello):
	New function.
	* tls/handshake/extension/keyshare.c (tls_hs_keyshare_write): Call new
	function.

	* tls/Makefile.am: Add MessageHash message source file.
	* tls/handshake/message/msghash.c: New file.
	* tls/include/tls_handshake.h: Add prototype of new function.

	* tls/handshake/message/shello.c (interpret_server_random)
	(interpret_ext_list, tls_hs_shello_interpret): Adapt HelloRetryRequest.

	* tls/handshake/client-server/client.c (read_server_hello): Modify
	interface.
	* tls/handshake/client-server/client.c (do_phase_hello): Call
	read_server_hello() according to new interface.

	* tls/handshake/extension/keyshare.c (read_keyshare_in_hrr): New
	function.
	* tls/handshake/extension/keyshare.c (tls_hs_keyshare_read): Call new
	function.

	* tls/handshake/message/shello.c (read_ext_list): Call function to read
	cookie extension.

	* tls/Makefile.am: Add cookie extension source file.
	* tls/handshake/extension/cookie.c: New file.
	* tls/include/extension/tls_cookie.h: Ditto.
	* tls/include/tls.h: Add variable storing cookie information to tls
	structure.
	* tls/include/tls_handshake.h: Add header inclusion.
	* tls/tls.c (free_cookie): New function.
	* tls/tls.c (tls_free_connection): Call new function.

	* tls/handshake/message/shello.c (read_server_random): Fix address bug.

	* tls/tls_handshake.c (dump_handshake_type): Add branches to output
	TLS 1.3 message type for debug.

	* tls/include/tls.h: Add states symbols for TLS 1.3 HelloRetryRequest
	message.
	* tls/tls_ccs.c (check_state_tls13, tls_ccs_send): Adapt
	HelloRetryRequest.
	* tls/tls_record.c (check_unencrypted_state, get_record)
	(compose_record): Adapt HelloRetryRequest.

	* tls/handshake/message/x-check_chello.c
	(test_read_client_random_normal, test_read_cipher_suite_normal)
	(test_tls_hs_chello_parse_normal_tls12)
	(test_tls_hs_chello_parse_normal): Modify test item to refer random and
	cipher suites list in tls_interim_params structure.

	* tls/handshake/message/chello.c (read_client_random)
	(read_cipher_suite): Store value to tls_interim_params structure.
	* tls/handshake/message/chello.c (interpret_random, interpret_cipher):
	New functions.
	* tls/handshake/message/chello.c (tls_hs_chello_interpret): Call new
	functions.

	* tls/include/tls_handshake.h: Add variables storing random and cipher
	suites list to tls_hs_interim_params structure.
	* tls/tls_handshake.c (tls_hs_interim_params_free): Finalize cipher
	suites list.

	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_free): Fix memory leak. [#434]

	* tls/handshake/extension/ecc.c (tls_hs_ecc_eclist_free):
	(tls_hs_ecc_pflist_free): New functions.
	* tls/include/extension/tls_ecc.h: Add prototype of new functions.

	* tls/handshake/message/x-check_chello.c (tls_hs_servername_read): New
	stub.
	* tls/handshake/message/x-check_shello.c (tls_hs_servername_write)
	(tls_hs_servername_read): Ditto.

	* tls/handshake/message/chello.c (write_ext): Call function to write
	server_name extension.
	* tls/handshake/message/shello.c (check_ext_availability_tls12): Add
	server_name extension to acceptable extension.
	* tls/handshake/message/encext.c (read_ext_list): Call function to read
	server_name extension.
	* tls/handshake/message/shello.c (read_ext_list): Ditto.

	* tls/handshake/message/chello.c (check_ext_availability_tls12): Add
	server_name extension to acceptable extension.
	* tls/handshake/message/chello.c (read_ext_list): Call function to read
	server_name extension.
	* tls/handshake/message/encext.c (write_encrypted_extensions): Call
	function to write server_name extension.
	* tls/handshake/message/shello.c (write_extension): Ditto.

	* tls/tls_cert.c (TLS_set_server_name, TLS_get_server_name): New
	functions.
	* aicrypto/nrg_tls.h: Add prototype of new functions.

	* tls/Makefile.am: Add server_name extension source file.
	* tls/handshake/extension/servername.c: New file.
	* tls/include/extension/tls_servername.h: Ditto.
	* tls/include/tls_handshake.h: Add header inclusion.

	* tls/include/tls.h: Add variable storing server name to tls structure.
	* tls/tls.c (init_certs): Initialize server name.
	* tls/tls.c (copy_certs): Duplicate server name.
	* tls/tls.c (free_certs): Finalize server name.

2019-02-27  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/Makefile.am: Add local header file to noinst_HEADERS.

	* tls/handshake/message/certreq.c (write_ext_cert_authorities): Stop
	sending empty certificate_authorities extension.

	* tls/handshake/message/cert.c (is_compatible_with_sighash): Enable
	client authentication by ECDSA certificate.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_read): Get correct
	signature scheme list without signature_algorithms_cert extension.

	* tls/handshake/extension/ecc.c: Add X25519 and X448 to default supported
	groups list.

	* tls/handshake/client-server/server.c (select_key_exchange_method): Add
	X25519 and X448 to named curve to be used in key exchange.

	* tls/handshake/client-server/client.c (select_key_exchange_method): Add
	X25519 and X448 to named curve to be used in key exchange.

	* tls/handshake/extension/keyshare.c (read_keyshare_in_chello)
	(read_keyshare_in_shello): Handle X25519 and X448 key_share.

	* tls/tls_key.c (tls_key_derive_handshake_secret): Derive handshake secret
	from X25519 and X448 shared secret.

	* tls/include/tls.h: Fix typo.

	* tls/handshake/ecdh/ecdh.c (calc_x448_shared_secret): New function.
	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_calc_shared_secret): Add branch
	to call new function.

	* tls/handshake/ecdh/ecdh.c (calc_x25519_shared_secret): New function.
	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_calc_shared_secret): Add branch
	to call new function.

	* tls/include/tls.h: Add new macro TLS_PREMASTER_SECRET_RSA_LEN.
	* tls/include/tls.h: Extend premaster secret buffer in tls structure and
	add variable storing premaster secret length to tls structure.
	* tls/handshake/ecdh/ecdh.c (calc_ecdsa_shared_secret): Set premaster
	secret length.
	* tls/handshake/message/ckeyexc.c (write_rsa_encypted_premaster)
	(read_rsa_encypted_premaster): Set premaster secret length and use it.
	* tls/handshake/message/ckeyexc.c (make_dummy_premster): Use premaster
	secret length.
	* tls/tls.c (init_cipher_param): Initialize premaster secret length.
	* tls/tls_key.c (tls_key_make_master_secret): Use premaster secret
	length.

	* tls/handshake/ecdh/ecdhkey.c (calc_ecdsa_shared_secret): Renamed from
	tls_hs_ecdh_calc_shared_secret(). Modify scope to local.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdh_calc_shared_secret): New
	function.

	* tls/handshake/ecdh/ecdhkey.c (set_peer_x448_pubkey): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_set_peer_pubkey): Add
	branch to call new function.

	* tls/handshake/ecdh/ecdhkey.c (set_peer_x25519_pubkey): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_set_peer_pubkey): Add
	branch to call new function.

	* tls/handshake/ecdh/ecdhkey.c (set_x448key_to_ecpoint): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_set_to_ecpoint): Add
	branch to call new function.

	* tls/handshake/ecdh/ecdhkey.c (set_x25519key_to_ecpoint): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_set_to_ecpoint): Add
	branch to call new function.

	* tls/handshake/ecdh/ecdhkey.c (x448key_generate): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_gen_for_server)
	(tls_hs_ecdhkey_gen_for_client): Add branch to call new function.

	* tls/handshake/ecdh/ecdhkey.c (x25519key_generate): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_gen_for_server)
	(tls_hs_ecdhkey_gen_for_client): Add branch to call new function.
	* tls/include/tls_handshake_ecdh.h: Add header inclusion.

	* tls/handshake/ecdh/ecdhkey.c (set_peer_ecdsa_pubkey): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_set_peer_pubkey): Call new
	internal function.

	* tls/handshake/ecdh/ecdhkey.c (set_ecdsakey_to_ecpoint): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_set_to_ecpoint): Call new
	internal function.

	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_gen_for_client): Add branch
	to call ecdsakey_generate().

	* tls/handshake/ecdh/ecdhkey.c (ecdsakey_gen_for_server): Renamed from
	tls_hs_ecdhkey_gen_for_server(). Modify scope to local.
	* tls/handshake/ecdh/ecdhkey.c(tls_hs_ecdhkey_gen_for_server): New
	function.

	* tls/handshake/ecdh/ecdhkey.c (ecdsakey_generate): Renamed from
	ecdhkey_generate().
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_gen_for_server)
	(tls_hs_ecdhkey_gen_for_client): Call renamed function.

	* tls/include/tls_handshake.h: Modify type of variables from
	Pubkey_ECDSA and Prvkey_ECDSA to Key.
	* tls/include/tls_handshake_ecdh.h: Ditto.
	* tls/include/tls_handshake_ecdh.h: Modify interface of
	tls_hs_ecdhkey_gen_for_client().
	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_calc_shared_secret)
	(tls_hs_ecdh_skeyexc_write_server_params)
	(tls_hs_ecdh_ckeyexc_write_exchange_keys, tls_hs_ecdh_free): Add type
	cast and modify free function.
	* tls/handshake/ecdh/ecdhkey.c (ecdhkey_generate)
	(tls_hs_ecdhkey_gen_for_client, tls_hs_ecdhkey_set_to_ecpoint)
	(tls_hs_ecdhkey_set_peer_pubkey)
	(tls_hs_ecdhkey_set_my_privkey_from_pkcs12)
	(tls_hs_ecdhkey_set_peer_pubkey_from_pkcs12): Ditto.
	* tls/handshake/extension/keyshare.c (write_keyshare_for_shello)
	(tls_hs_keyshare_free): Modify free function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_gen_for_client): Modify
	interface.

2019-02-27  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 3.5
	* configure.ac: Bump up the minor version number.

2019-02-15  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_calc_shared_secret): Fix memory
	leak. [#433]

	* edc/Makefile.am: Add edc test source file.
	* edc/edctest.c: New file.
	* edc/edctest.h: Ditto.
	* edc/edctestfc.c: Ditto.

	* edc/edc.c (X448_generate_shared_secret): New function.
	* aicrypto/nrg_edc.h: Add prototype of new function.

	* edc/edc_key.c (448pubkey_new, X448prvkey_new, X448key_free)
	(X448prv_generate, X448prv_2pub, X448pub_dup, X448prv_dup): New
	functions.
	* aicrypto/nrg_edc.h: Add Pubkey_X448 and Prvkey_X448 structure and
	prototype of new functions.

	* aicrypto/nrg_edc.h: Add new macro X448_KEY_LENGTH.
	* edc/edc.c (X448_derive): New function.
	* edc/edc_internal.h: Add prototype of new function.

	* aicrypto/key_type.h: Add new macro KEY_X448_PUB and KEY_X448_PRV.

	* edc/edc.c (X25519_generate_shared_secret): New function.
	* aicrypto/nrg_edc.h: Add prototype of new function.

	* edc/Makefile.am: Add edc_key source file.
	* edc/edc_key.c: New file.
	* aicrypto/nrg_edc.h: Add prototype of new functions.

	* edc/Makefile.am: Add edc source file.
	* aicrypto/nrg_edc.h: New file.
	* edc/edc.c: Ditto.
	* edc/edc_internal.h: Ditto.

	* aicrypto/key_type.h: Add new macro KEY_X25519_PUB and KEY_X25519_PRV.

	* edc/README.goldilocks: New file.

	* Makefile.am: Add edc module.
	* configure.ac: Ditto.
	* edc/Makefile.am: New file.

	* edc/ed448goldilocks_generated: Import source files to be generated
	at build.

	* edc/ed448goldilocks: Import libdecaf from sourceforge repository
	at commit id '03977eba48da31dd071a0973aef373ad0441b990'.

	* tls/handshake/message/cert.c: Fix comment.
	* tls/handshake/message/certreq.c: Ditto.
	* tls/handshake/message/shello.c: Ditto.

	* tls/handshake/message/encext.c (tls_hs_encext_parse): Call
	read_encrypted_extensions().

	* tls/handshake/message/encext.c (read_encrypted_extensions): New
	function.

	* tls/handshake/message/encext.c: Add prototype.

	* tls/handshake/message/certvfy.c (read_certvfy_up_to_tls12)
	(read_certvfy_tls13, read_certvfy): New functions.
	* tls/handshake/message/certvfy.c (tls_hs_certvfy_parse): Call new
	function.

	* tls/handshake/message/certvfy.c (write_certvfy_up_to_tls12)
	(write_certvfy_tls13, write_certvfy): New functions.
	* tls/handshake/message/certvfy.c (tls_hs_certvfy_compose): Call new
	function.

	* tls/handshake/message/cert.c (read_ccert): New function.
	* tls/handshake/message/cert.c (tls_hs_ccert_parse): Cal new internal
	function.

	* tls/handshake/message/cert.c (write_ccert): New function.
	* tls/handshake/message/cert.c (tls_hs_ccert_compose): Cal new internal
	function.

	* tls/handshake/message/cert.c (read_scert): New function.
	* tls/handshake/message/cert.c (tls_hs_scert_parse): Cal new internal
	function.

	* tls/handshake/message/cert.c (write_scert): New function.
	* tls/handshake/message/cert.c (tls_hs_scert_compose): Cal new internal
	function.

	* tls/handshake/extension/keyshare.c (read_keyshare_in_chello): Use peer
	supported groups list to check group appearance order.

	* tls/handshake/extension/ecc.c (tls_hs_ecc_read_elliptic_curves): Store
	peer supported_groups extension.

	* tls/include/tls_handshake.h: Add variable storing peer
	supported_groups extension to tls_hs_ecdh structure.
	* tls/handshake/extension/ecc.c (save_peer_eclist): New function.

	* tls/handshake/extension/ecc.c (save_eclist): Call compose_eclist().

	* tls/handshake/extension/ecc.c (compose_eclist): New function.

	* tls/tls_handshake.c: Defer handshake queue cleanup to handle
	post-handshake message.
	* tls/tls_record.c: Call post-handshake message handler.

	* a/tls/tls_handshake.c (posthandshake_message_tls13)
	(tls_hs_posthandshake_message): New functions.
	* tls/include/tls_handshake.h: Add prototype of new function.

	* tls/tls_handshake.c (dump_handshake_type): Add branches to output
	TLS 1.3 message type for debug.

	* tls/cipher/aead.c (tls_decipher_aead): Implement TLS 1.3
	CHACHA20_POLY1305 decryption.

	* tls/cipher/aead.c (tls_cipher_aead): Implement TLS 1.3
	CHACHA20_POLY1305 encryption.

	* tls/tls_key.c (make_aicrypto_key): Adapt ChaCha key.

	* tls/tls_cipher.c (tls_cipher_param_set): Add cipher parameter of
	TLS_CHACHA20_POLY1305_SHA256.

	* tls/include/tls_mac.h: Add new macro
	TLS_CHACHA20_POLY1305_AUTHENTICATION_TAG_SIZE.

	* tls/include/tls.h: Add ChaCha20 symbol to enum bulk_cipher_algorithm.

	* chacha/chacha20_poly1305.c (chacha20_poly1305_decrypt): New function.
	* aicrypto/nrg_chacha.h: Add prototype of new function.

	* x509/key.c (Key_new, Key_free, Key_set, Key_set_iv): Add branches to
	call ChaCha key function.
	* x509/key_tool.c (Key_dup): Ditto.

	* chacha/Makefile.am: Add chacha_key source file.
	* chacha/chacha_key.c: New file.
	* aicrypto/nrg_chacha.h: Add prototype of new functions.

	* aicrypto/nrg_chacha.h: Modify ChaCha_state to Key_ChaCha and add
	variables storing key and initialization vector.

	* aicrypto/nrg_chacha.h: Add new macro CHACHA_KEY_LENGTH,
	CHACHA_NONCE_LENGTH and CHACHA_IV_LENGTH.

	* aicrypto/key_type.h: Add new macro KEY_CHACHA.

	* tls/handshake/client-server/server.c
	(write_certificate_request_tls13): Implement function.

	* tls/handshake/message/certreq.c (write_certreq_tls13): New function.
	* tls/handshake/message/certreq.c (write_certreq): Add branch to call
	new function.

	* tls/handshake/message/certreq.c (read_certreq_tls13): New function.
	* tls/handshake/message/certreq.c (read_certreq): Add branch to call
	new function.

	* tls/handshake/message/certreq.c (write_ext_cert_authorities): New
	function.

	* tls/handshake/message/certreq.c (write_ext_sigalgo_cert): New
	function.

	* tls/handshake/message/certreq.c (write_ext_sigalgo): New function.

	* tls/handshake/message/certreq.c (interpret_ext_list): New function.

	* tls/handshake/message/certreq.c (read_ext_list): New function.

	* tls/handshake/message/certreq.c (read_cert_authorities): Check minimum
	list length.

	* tls/handshake/message/certreq.c (check_ext_availability_tls13)
	(check_ext_availability): New functions.

	* tls/handshake/message/certreq.c (read_cert_sigalgo): Use new protocol
	version symbols.

	* tls/handshake/message/certreq.c (read_cert_authorities): Fix return
	value on error. [#426]

	* tls/handshake/message/certreq.c (read_cert_sigalgo): Fix return value
	on error. [#425]

	* tls/handshake/extension/sighash.c (tls_hs_sighash_cert_read): Use
	correct signature scheme list.

	* tls/handshake/extension/sighash.c (sighash_availablep_by_ss): Renamed
	from tls_hs_sighash_availablep_by_ss(). Modify scope to local.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_availablep): Call
	renamed function.
	* b/tls/include/extension/tls_sighash.h: Remove prototype of the
	function whose scope is modified to local.

	* tls/handshake/extension/sighash.c (sighash_cert_availablep_by_ss)
	(tls_hs_sighash_availablep_cert): New functions.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/handshake/message/certreq.c (write_certreq_up_to_tls12)
	(write_certreq): New functions.
	* tls/handshake/message/certreq.c (tls_hs_certreq_compose):
	Call new internal function.

	* tls/handshake/message/certreq.c (read_certreq_up_to_tls12)
	(read_certreq): New functions.
	* tls/handshake/message/certreq.c (tls_hs_certreq_parse):
	Call new internal function.

	* tls/tls_alert.c (send_alert): New function.
	* tls/tls_alert.c (tls_alert_send): Fix segmentation fault by infinite
	recursive call. [#419]

2019-01-29  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Bump up the REVISION number of libaicrypto.

2019-01-23  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/extension/sighash.c: Separate default signature
	scheme list into list for signature_algorithms extension and list for
	signature_algorithms_cert extension.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_list_cert): Use
	signature scheme list for signature_algorithms_cert extension.

	* poly1305/poly1305-donna/poly1305-donna.c: Fix macros to compile in
	FreeBSD 11 environment.

	* tls/handshake/message/x-check_chello.c (tls_hs_sighash_cert_read):
	New test case.

	* tls/handshake/message/cert.c (read_certchain_tls13): Adapt
	signature_algorithms_cert extension.

	* tls/handshake/message/cert.c (write_certchain_tls13): Adapt
	signature_algorithms_cert extension.

	* tls/handshake/message/cert.c (get_fallback_sighash_list): Adapt
	signature_algorithms_cert extension.

	* tls/handshake/message/chello.c (write_ext): Call function to write
	signature_algorithms_cert extension.

	* tls/handshake/message/chello.c (write_ext_sigalgo_cert): New function.

	* tls/handshake/message/chello.c (read_ext_list): Adapt
	signature_algorithms_cert extension.
	* tls/handshake/message/chello.c (interpret_ext_list): Make sure that
	signature_algorithms_cert extension is processed earlier than
	signature_algorithms extension.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_cert_write): New
	function.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_list_cert): New
	function.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_cert_read): New
	function.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_read): Adapt
	signature_algorithms_cert extension.

	* tls/handshake/extension/sighash.c (compose_sighash): Renamed from
	save_sighash() and modify interface.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_read)
	(tls_hs_sighash_save_default): Call new function.

	* tls/include/tls.h: Add variable storing peer signature_algorithms
	extension to tls structure.
	* tls/tls.c (init_handshake): Initialize peer signature_algorithms
	extension.
	* tls/handshake/client-server/client.c (cleanup): Finalize peer
	signature_algorithms extension.
	* tls/handshake/client-server/server.c (cleanup): Ditto.

	* tls/tls_cipher.c (tls_cipher_param_set): Add cipher parameter of
	TLS_AES_256_GCM_SHA384.
	* tls/tls_cipher.c: Modify cipher suites priority.

	* tls/tls_record.c (get_record_tls13_encrypted): Renamed from
	get_record_tls13().
	* tls/tls_record.c (get_record): Call renamed function.

	* tls/tls_record.c (compose_record_tls13): Send ChangeCipherSpec as
	plaintext in TLS 1.3.

	* tls/cipher/aead.c (tls_decipher_aead): Implement TLS 1.3 AES-GCM
	decryption.

	* tls/cipher/aead.c (tls_cipher_aead): Implement TLS 1.3 AES-GCM
	encryption.

	* tls/include/tls_mac.h: Add new macro
	TLS_AES_GCM_AUTHENTICATION_TAG_SIZE.

	* tls/tls_mac.c (tls_aad_generate): Modify interface and adapt TLS 1.3.
	* tls/include/tls_mac.h: Modify prototype.

	* tls/tls_mac.c (init_text_tls13): New function.

	* tls/tls_mac.c (init_text_tls12): Renamed from functions without
	_up_to_tls12 suffix.
	* tls/tls_mac.c (tls_mac_init): Call renamed function.

	* tls/include/tls_mac.h: Add new macro AAD_SIZE_TLS13.

	* tls/include/tls_mac.h: Rename macro AAD_SIZE to AAD_SIZE_TLS12.
	* tls/cipher/aead.c (tls_cipher_aead, tls_decipher_aead): Rename macro.
	* tls/tls_mac.c (tls_aad_generate): Rename macro.

	* tls/include/tls_cipher.h: Add new macro TLS_AES_GCM_NONCE_SIZE.

	* tls/handshake/message/chello.c (read_ext_list): Ignore unknown
	extension.

	* tls/handshake/client-server/client.c (do_phase_final_tls13): Derive
	application traffic keys.

	* tls/handshake/client-server/client.c (do_phase_hello): Derive
	handshake traffic keys.

	* tls/handshake/client-server/client.c (derive_application_secrets):
	New function.

	* tls/handshake/client-server/server.c (do_phase_final_tls13): Derive
	application traffic keys.

	* tls/handshake/client-server/server.c (do_phase_hello): Derive
	handshake traffic keys.

	* tls/handshake/client-server/server.c (derive_application_secrets):
	New function.

	* tls/tls_key.c (tls_key_make_traffic_key): New function.

	* tls/tls_key.c (tls_key_derive_application_traffic_secrets): New
	function.

	* tls/handshake/client-server/client.c (read_finished_tls13): Store
	handshake context.
	* tls/handshake/client-server/server.c (write_finished_tls13): Ditto.
	* tls/include/tls.h: Add new macro
	TLS_APPLICATION_SECRET_CONTEXT_SIZE_MAX.
	* tls/include/tls.h: Add variable storing handshake context to tls
	structure.
	* tls/tls_key.c (derive_application_secret): New function.

	* tls/tls_key.c (make_enc_key): Fix IV length calculation. [#418]

	* tls/handshake/extension/sighash.c: Add RSASSA-PSS with rsaEncryption
	to default signature scheme list.

	* tls/handshake/message/certvfy.c (tls_hs_certvfy_parse): Adapt TLS 1.3.

	* tls/handshake/message/certvfy.c (tls_hs_certvfy_compose): Adapt TLS 1.3.

	* tls/tls_digitally_signed.c (read_digitally_signed_hash_tls13): New
	function.
	* tls/tls_digitally_signed.c (tls_digitally_signed_read_hash): Call new
	function.

	* tls/tls_digitally_signed.c (check_cert): New function.

	* tls/tls_digitally_signed.c (write_digitally_signed_hash_tls13): New
	function.
	* tls/tls_digitally_signed.c (tls_digitally_signed_write_hash): Call
	new function.

	* tls/tls_digitally_signed.c (search_sigscheme_in_sighash): New
	function.

	* tls/tls_digitally_signed.c (get_signature_scheme): New function.

	* tls/tls_digitally_signed.c (compose_verification_data): New function.

	* tls/tls_digitally_signed.c (check_rsassa_pss_sigscheme_availability):
	New function.

	* tls/tls_digitally_signed.c (check_ecdsa_sigscheme_availability): New
	function.

	* tls/tls_digitally_signed.c (check_rsa_sigscheme_availability): New
	function.

	* tls/handshake/extension/sighash.c
	(tls_hs_sighash_convert_sighash_to_sigscheme): Renamed from
	convert_sigalgo_to_sigscheme(). Modify scope to global.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_availablep)
	(tls_hs_sighash_get_ai_sig_type): Call renamed function.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/include/tls_digitally_signed.h: Add new macro
	TLS_DS_PADDING_LENGTH, TLS_DS_CONTEXT_STRING_LENGTH,
	TLS_DS_SEPARATOR_LENGTH and TLS_DS_PREFIX_LENGTH.

	* rsa/rsa_pss.c (RSA_PSS_salt_gen, RSA_PSS_sign_digest): Fix assertion
	problems. [#416, #417]

	* tls/handshake/extension/sighash.c (tls_hs_sighash_get_hash_type): New
	function.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/handshake/extension/sighash.c
	(tls_hs_sighash_get_hash_size_by_ss): New function.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_availablep_by_ss):
	New function.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_availablep): Call
	new internal function.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/handshake/extension/sighash.c
	(tls_hs_sighash_get_ai_hash_type_by_ss): New function.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/handshake/message/cert.c (read_certchain_up_to_tls12): Fix memory
	leak. [#415]

	* tls/handshake/message/cert.c (tls_hs_ccert_parse): Adapt TLS 1.3.

	* tls/handshake/message/cert.c (tls_hs_scert_parse): Adapt TLS 1.3.

	* tls/handshake/message/cert.c (tls_hs_ccert_compose): Adapt TLS 1.3.

	* tls/handshake/message/cert.c (tls_hs_scert_compose): Adapt TLS 1.3.

	* tls/handshake/message/cert.c (read_certchain_tls13): New function.

	* tls/handshake/message/cert.c (write_certchain_tls13): New function.

	* tls/handshake/message/cert.c (get_fallback_sighash_list): New
	function.

	* tls/handshake/message/cert.c (check_certchain_produced_by_sighash):
	New function.

	* tls/handshake/message/cert.c (check_cert_sighash): Fix alert type.

	* tls/handshake/message/cert.c (is_compatible_with_sighash): New
	function.

	* tls/handshake/message/cert.c (search_sighash_for_rsassa_pss): New
	function.

	* tls/handshake/message/cert.c (search_sighash_for_ecdsa): New function.

	* tls/handshake/message/cert.c (search_sighash_for_rsa): New function.

	* tls/handshake/message/cert.c
	(check_rsassa_pss_sigscheme_availability): New function.

	* tls/handshake/message/cert.c (check_ecdsa_sigscheme_availability):
	New function.

	* tls/handshake/message/cert.c (check_rsa_sigscheme_availability): New
	function.

	* tls/handshake/extension/sighash.c
	(tls_hs_sighash_get_ai_sig_type_by_ss): New function.
	* tls/handshake/extension/sighash.c
	(tls_hs_sighash_get_ai_sig_type): Call new internal function.
	* tls/include/extension/tls_sighash.h: Add prototype of new function.

	* tls/handshake/message/cert.c (interpret_ext_list): New function.

	* tls/handshake/message/cert.c (read_ext_list): New function.

	* tls/handshake/message/cert.c (check_ext_availability_tls13)
	(check_ext_availability): New functions.

	* tls/handshake/message/cert.c (write_certchain_up_to_tls12)
	(read_certchain_up_to_tls12): Use new protocol version symbols.

	* tls/handshake/message/cert.c (check_cert_sighash): Use
	tls_hs_sighash_list structure passed by argument.

	* tls/handshake/message/cert.c (write_certchain_up_to_tls12)
	(read_certchain_up_to_tls12): Renamed from functions without
	_up_to_tls12 suffix.
	* tls/handshake/message/cert.c (tls_hs_scert_compose)
	(tls_hs_scert_parse, tls_hs_ccert_compose, tls_hs_ccert_parse): Call
	renamed function.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_get_ai_sig_type):
	Add TLS 1.3 signature scheme branches.

	* tls/handshake/extension/sighash.c (get_ai_rsa_sig_type)
	(get_ai_dsa_sig_type, get_ai_ecdsa_sig_type): Remove functions.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_get_ai_sig_type):
	Merge removed functions.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_save_default):
	Fix calculation of pair length. [#411]

	* tls/handshake/client-server/client.c (do_phase_hello): Set cipher
	parameters for TLS 1.3.

	* tls/handshake/client-server/server.c (do_phase_hello): Set cipher
	parameters for TLS 1.3.

	* tls/handshake/message/finished.c (read_verify_data_tls13): New
	function.
	* tls/handshake/message/finished.c (read_verify_data): Call new
	function.

	* tls/handshake/message/finished.c (read_verify_data_tls12): Renamed
	from functions without _up_to_tls12 suffix.
	* tls/handshake/message/finished.c (read_verify_data): New function.

	* tls/handshake/message/finished.c (write_verify_data_tls13): New
	function.
	* tls/handshake/message/finished.c (write_verify_data): Call new
	function.

	* tls/handshake/message/finished.c (do_hmac_sha256, do_hmac_sha384): New
	function.

	* tls/handshake/message/finished.c (write_verify_data_tls12): Renamed
	from functions without _up_to_tls12 suffix.
	* tls/handshake/message/finished.c (write_verify_data): New function.

	* tls/tls_cipher.c (tls_cipher_param_set): Add cipher parameter of
	TLS_AES_128_GCM_SHA256.

	* tls/include/tls.h: Add HKDF algorithm symbols.

	* tls/handshake/client-server/client.c (select_key_exchange_method):
	New function.
	* tls/handshake/client-server/client.c (interpret_server_hello): Call
	new function.

	* tls/handshake/client-server/server.c (select_key_exchange_method):
	New function.
	* tls/handshake/client-server/server.c (interpret_client_hello): Call
	new function.

	* tls/tls_key.c (tls_key_derive_master_secret): New function.

	* tls/handshake/client-server/client.c (derive_handshake_secrets): New
	function.
	* tls/handshake/client-server/client.c (do_phase_hello): Call new
	function.

	* tls/handshake/client-server/server.c (derive_handshake_secrets): New
	function.
	* tls/handshake/client-server/server.c (do_phase_hello): Call new
	function.

	* tls/include/tls.h: Add variable storing traffic secret to
	tls_connection structure.
	* tls/tls.c (free_cipher_param): Finalize traffic secret.
	* tls/tls_key.c (tls_key_derive_handshake_traffic_secrets): New
	function.

	* tls/include/tls.h: Add variable storing handshake secret to tls
	structure.
	* tls/tls.c (free_cipher_param): Finalize handshake secret.
	* tls/tls_key.c (tls_key_derive_handshake_secret): New function.

	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_calc_shared_secret): Renamed
	from calc_shared_secret(). Modify scope to global.
	* tls/include/tls_handshake.h: Add prototype of renamed function.
	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_ckeyexc_write_exchange_keys)
	(tls_hs_ecdh_ckeyexc_read_exchange_keys): Rename calc_shared_secret().

	* tls/include/tls.h: Add variable storing early secret to tls structure.
	* tls/tls.c (free_cipher_param): Finalize early secret.
	* tls/tls_key.c (tls_key_derive_early_secret): New function.

	* tls/tls_key.c (get_hkdf_hash): New function.

	* tls/tls_key.c (derive_secret): New function.

	* tls/include/tls_hkdf.h: Add new macro TLS_HKDF_LABEL_SIZE_MAX.
	* tls/include/tls_hkdf.h: Add prototype of new function.
	* tls/tls_key.c (tls_key_hkdf_expand_label): new function.

	* tls/include/tls_hkdf.h: New file.
	* tls/tls_key.c (compose_hkdf_label): New function.

	* tls/tls_cipher.c (tls_cipher_hashalgo): New function.

	* tls/handshake/message/chello.c (tls_hs_chello_interpret): Arrange
	protocol version specific process.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_save_default):
	Add comment.

	* tls/tls_cipher.c (tls_cipher_select): Arrange protocol version
	specific process.

	* tls/handshake/client-server/server.c (interpret_client_hello)
	(cleanup): Change cleanup timing of cipher suites list structure.

	* tls/tls_cipher.c (tls_cipher_list_free): Add null check.

	* tls/Makefile.am: New unit test file.
	* tls/x-check_tls_cipher.c: New file.

	* tls/tls_cipher.c: Add TLS 1.1 default cipher suites list.

	* tls/include/tls.h: Add TLS 1.1 cipher symbols.

	* tls/handshake/message/x-check_chello.c (setup_tls): Update comment.
	* tls/handshake/message/x-check_chello.c
	(test_tls_hs_extension_parse_normal)
	(test_tls_hs_extension_parse_normal_no_extesion_provided)
	(tls_hs_extension_parse_suite)
	(test_tls_hs_chello_parse_failure_tls_hs_extension_parse): Renamed from
	functions related to read_ext().
	* tls/handshake/message/x-check_chello.c (tls_hs_chello_parse_suite)
	(main): Rename functions related to read_ext().
	* tls/handshake/message/x-check_chello.c
	(test_tls_hs_chello_parse_failure_read_ext): Remove test item.
	* tls/handshake/message/x-check_chello.c (tls_hs_extension_parse): New
	stub.
	* tls/handshake/message/x-check_shello.c
	(test_tls_hs_extension_parse_normal)
	(test_tls_hs_extension_parse_normal_no_extension)
	(test_tls_hs_extension_parse_failure_invalid_record_length_1)
	(test_tls_hs_extension_parse_failure_invalid_record_length_2)
	(tls_hs_extension_parse_suite)
	(test_tls_hs_shello_parse_failure_tls_hs_extension_parse): Renamed from
	functions related to read_extension().
	* tls/handshake/message/x-check_shello.c (tls_hs_shello_parse_suite)
	(main): Rename functions related to read_extension().
	* tls/handshake/message/x-check_shello.c (tls_hs_extension_parse):
	New stub.

	* tls/Makefile.am: Add common extension parser file.
	* tls/handshake/extension/parse.c: New file.
	* tls/handshake/message/chello.c (read_ext): Remove function.
	* tls/handshake/message/chello.c (tls_hs_chello_parse): Call common
	parser function.
	* tls/handshake/message/encext.c (read_encrypted_extensions): Remove
	function.
	* tls/handshake/message/encext.c (tls_hs_encext_parse): Call common
	parser function.
	* tls/handshake/message/shello.c (read_extension): Remove function.
	* tls/handshake/message/shello.c (tls_hs_shello_parse): Call common
	parser function.
	* tls/include/tls_handshake.h: Add new macro TLS_EXT_SIZE_MAX.
	* tls/include/tls_handshake.h: Add prototype of new function.

	* tls/handshake/message/shello.c (read_extension, interpret_ext_list):
	Move comment position.

	* tls/handshake/client-server/server.c (establish_protocol_version):
	Add comment.

	* kdf/hkdf.c (get_hmac): Enable SHA384 and SHA512.
	* kdf/hkdf.c: Update comment.
	* aicrypto/nrg_kdf.h: Ditto.

	* tls/tls_alert.c (dump_alert): Add branches to output alerts for debug.

	* tls/handshake/message/chello.c (interpret_ext_list): Check mandatory
	extensions in ECDHE.

	* tls/tls_alert.c (check_alert_desc): Add branches to handle alerts.

	* tls/include/tls_alert.h: Add alert type symbols.

	* tls/handshake/message/chello.c (write_ext_sigalgo): Adapt TLS 1.3.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_read): Check if
	valid signature and hash algorithm pair exists. [#409]

	* tls/handshake/extension/sighash.c (tls_hs_sighash_availablep): Adapt
	TLS 1.3.

	* tls/handshake/extension/sighash.c (merge_signature_scheme_list): New
	function.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_list): Return
	signature scheme list according to context.
	* tls/include/extension/tls_sighash.h: Add new macro
	TLS_EXT_SIG_ALGO_SIZE_MAX.

	* tls/handshake/extension/sighash.c (convert_sigscheme_to_sigalgo)
	(convert_sigalgo_to_sigscheme): New function.

	* tls/handshake/extension/sighash.c: Add default signature scheme list
	for TLS 1.2 and TLS 1.3.

	* tls/include/extension/tls_sighash.h: Add signature scheme symbols.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_list): Use new
	protocol version symbols.

	* tls/handshake/message/encext.c (write_encrypted_extensions):
	Implement function.

	* tls/handshake/client-server/client.c
	(read_encrypted_extensions_tls13): Call EncryptedExtensions message
	handler.

	* tls/handshake/message/encext.c (read_ext_list): Implement function.

	* tls/handshake/extension/ecc.c (tls_hs_ecc_read_elliptic_curves):
	Adapt EncryptedExtensions message.

	* tls/handshake/message/chello.c (interpret_ext_list): Clean up
	extension queue after message interpretation.
	* tls/handshake/message/encext.c (write_encrypted_extensions)
	(interpret_ext_list): Ditto.
	* tls/handshake/message/shello.c (interpret_ext_list): Ditto.

	* tls/handshake/extension/ecc.c (tls_hs_ecc_write_elliptic_curves):
	Adapt TLS 1.3.

	* tls/handshake/message/x-check_chello.c (tls_hs_keyshare_read):
	New stub.
	* tls/handshake/message/x-check_shello.c (tls_hs_keyshare_write)
	(tls_hs_keyshare_read): Ditto.

	* tls/handshake/message/chello.c (write_ext): Call function to write
	key_share extension.
	* tls/handshake/message/shello.c (read_ext_list): Call function to read
	key_share extension.

	* tls/handshake/message/chello.c (read_ext_list): Call function to read
	key_share extension.
	* tls/handshake/message/shello.c (write_extension): Call function to
	write key_share extension.

	* tls/Makefile.am: Add key_share extension source file.
	* tls/handshake/extension/keyshare.c: New file.
	* tls/include/extension/tls_keyshare.h: Ditto.
	* tls/include/tls_handshake.h: Add prototype of new function. Add
	variable to interim_params.
	* tls/tls_handshake.c (tls_hs_interim_params_init): Initialize key_share
	extension queue.
	* tls/tls_handshake.c (tls_hs_interim_params_free): Finalize key_share
	extension queue.

	* tls/handshake/message/chello.c (write_ext): Save sending status of
	extension.
	* tls/handshake/message/shello.c (write_extension): Ditto.

	* tls/handshake/message/chello.c (interpret_ext_list): Make sure that
	supported_groups extension is processed earlier than key_share
	extension.

	* tls/handshake/message/chello.c (interpret_ext_list): Set message
	context for extension interpretation.
	* tls/handshake/message/shello.c (interpret_ext_list): Ditto.

	* tls/include/tls_handshake.h: Add flag arrays that indicates extension
	processing to tls structure.
	* tls/handshake/message/chello.c (read_ext_list): Prevent multiple same
	extension.
	* tls/handshake/message/shello.c (read_ext_list): Ditto.
	* tls/handshake/message/shello.c (interpret_ext_list): Remove comment.

	* tls/include/tls_handshake.h: Add end marker to enum
	tls_extension_type.

	* tls/handshake/message/x-check_shello.c (tls_hs_change_state): Add
	stub.

	* tls/handshake/message/chello.c (write_session_id): Add comment.

	* tls/handshake/client-server/server.c (do_phase_hello): Implement
	compatibility mode.
	* tls/handshake/message/chello.c (interpret_session_id_up_to_tls12):
	Renamed from functions without _up_to_tls12 suffix.
	* tls/handshake/message/chello.c (interpret_session_id_tls13)
	(interpret_session_id): New functions.

	* tls/tls_ccs.c (tls_ccs_send): Adapt compatibility mode in TLS 1.3.

	* tls/tls_record.c (read_fragments_handshake): Add re-negotiation
	inspection.
	* tls/tls_record.c (read_fragments): Add error handling.

	* tls/handshake/message/shello.c (tls_hs_shello_interpret): Disable
	HelloRetryRequest.
	* tls/handshake/message/shello.c (tls_hs_shello_interpret): Adapt
	downgrade protection.

	* tls/handshake/message/shello.c (interpret_server_random): Adapt
	downgrade protection.

	* tls/handshake/message/shello.c (interpret_session_id_up_to_tls12):
	Renamed from functions without _up_to_tls12 suffix.
	* tls/handshake/message/shello.c (interpret_session_id_tls13)
	(interpret_session_id): New functions.

	* tls/handshake/message/shello.c (write_session_id): Write ServerHello
	session id in TLS 1.3 manner.

	* tls/tls_record.c (tls_record_write): Make ready to record padding.

	* tls/handshake/message/x-check_shello.c
	(tls_util_check_version_in_supported_version): New stub.

	* tls/handshake/message/shello.c (read_server_random): Adapt downgrade
	protection.

	* tls/handshake/message/shello.c (write_server_random): Adapt downgrade
	protection.

	* tls/tls_record.c (read_queue): Fix buffer overrun. [#408]

	* tls/tls_ccs.c (tls_ccs_recv): Add ChangeCipherSpec handling in TLS
	1.3.

	* tls/tls_ccs.c (check_state_tls13): New function.

	* tls/tls_record.c (compose_record_tls13): New function.
	* tls/tls_record.c (compose_record): Add branch to call new function.

	* tls/tls_record.c (check_unencrypted_state, get_record_tls13): New
	functions.
	* tls/tls_record.c (get_record): Add branch to call new function.

	* tls/tls_record.c (compose_record_up_to_tls12, compose_record): New
	functions.
	* tls/tls_record.c (tls_record_write): Separate record composition
	process from the function.

	* tls/tls_record.c (get_record_up_to_tls12): Renamed from function
	without _up_to_tls12 suffix.
	* tls/tls_record.c (get_record): New function.

	* tls/include/tls_record.h: Add new macro TLS_PADDING_VALUE_TLS13.

	* b/tls/cipher/aead.c (tls_cipher_aead): Modify record length check to
	be ready for TLS 1.3.

	* tls/include/tls_record.h: Add new macro
	TLS_RECORD_CIPHERED_FRAGMENT_SIZE_MAX_TLS13.

	* tls/include/tls_record.h: Rename TLS_RECORD_CIPHERED_FRAGMENT_SIZE_MAX
	to TLS_RECORD_CIPHERED_FRAGMENT_SIZE_MAX_UP_TO_TLS12.
	* tls/cipher/aead.c (tls_cipher_aead, tls_decipher_aead): Use new macro.
	* tls/cipher/block.c (init_block, tls_cipher_block): Ditto.
	* tls/cipher/stream.c (write_stream): Ditto.
	* tls/tls_record.c (get_record, tls_record_write): Ditto.

	* tls/cipher/aead.c (tls_cipher_aead, tls_decipher_aead): Use new
	protocol version symbols.

	* tls/tls_record.c (get_record): Fix memory leak on error. [#407]

	* tls/handshake/client-server/x-check_client.c (tls_hs_certvfy_compose):
	New stub.
	* tls/handshake/client-server/x-check_server.c (tls_hs_check_state)
	(tls_hs_update_hash, tls_hs_certreq_compose, tls_hs_certvfy_compose)
	(tls_hs_finished_compose): Ditto.

	* tls/tls.c: Add TLS 1.3 symbol to default protocol version list to
	be negotiated.

	* tls/handshake/client-server/server.c (check_auth_by_cert): Enable
	server Certificate only when using (EC)DHE.
	* tls/handshake/client-server/server.c (write_certificate_tls13): Add
	comment.
	* tls/tls_cipher.c (tls_cipher_select): Add TLS 1.3 branch to defer
	key exchange method decision.

	* tls/tls_cipher.c (tls_cipher_keyexc_method_dump): Add branches to
	output TLS 1.3 key exchange method for debug.

	* tls/tls_cipher.c (tls_cipher_suite_dump): Add branches to output
	TLS 1.3 cipher suites for debug.

	* tls/include/tls.h: Add key exchange method symbols.

	* tls/tls_cipher.c (tls_cipher_supported_list): Return TLS 1.3 cipher
	suites list according to context.

	* tls/tls_cipher.c (tls_cipher_supported_list): Use new protocol version
	symbols.

	* tls/tls_cipher.c: Add TLS 1.3 default cipher suites list.
	* tls/tls_cipher.c (tls_cipher_set_tls13): New function.
	* tls/tls_cipher.c (tls_cipher_set): Add branch to call new function.

	* tls/tls_handshake.c (check_handshake_type_up_to_tls12): Renamed from
	functions without _up_to_tls12 suffix.
	* tls/tls_handshake.c (check_handshake_type_tls13)
	(check_handshake_type): New functions.
	* tls/tls_handshake.c (tls_handshake_read): Call new
	check_handshake_type().

	* tls/handshake/message/certreq.c (tls_hs_certreq_compose): Use new
	protocol version symbols.
	* tls/tls_cipher.c (tls_cipher_set): Ditto.
	* b/tls/tls_digitally_signed.c (tls_digitally_signed_write_hash)
	(tls_digitally_signed_read_hash): Ditto.

	* tls/tls_handshake.c (dump_handshake_type): Add branches to output
	TLS 1.3 message type for debug.

	* tls/tls_handshake.c (tls_hs_change_state): Add branches to output
	TLS 1.3 states for debug.

	* tls/x-check_tls_util.c
	(test_tls_util_convert_ver_to_protover_normal)
	(test_tls_util_convert_protover_to_ver_normal): New test cases.
	* tls/x-check_tls_util.c
	(tls_util_convert_ver_to_protover_suite)
	(tls_util_convert_protover_to_ver_suite): New test suites.
	* tls/x-check_tls_util.c (main): Add new test suites.

	* tls/handshake/message/shello.c (interpret_ext_list): Add comments.

	* tls/handshake/message/x-check_shello.c
	(test_tls_hs_shello_compose_failure_write_cmp_method): Set protocol
	version.

	* tls/handshake/client-server/x-check_client.c (tls_util_read_2)
	(tls_util_check_version_in_supported_version)
	(tls_hs_supported_versions_read): New stubs.
	* tls/handshake/message/x-check_chello.c
	(tls_util_convert_protover_to_ver): New stub.
	* tls/handshake/message/x-check_shello.c
	(tls_util_convert_protover_to_ver)
	(tls_hs_supported_versions_write, tls_hs_check_state): New stubs.

	* tls/handshake/extension/ecc.c (tls_hs_ecc_write_ec_point_formats):
	Write Supported Point Formats extension according to protocol version.

	* tls/handshake/extension/ecc.c (tls_hs_ecc_write_elliptic_curves)
	(tls_hs_ecc_write_ec_point_formats): Use new protocol version symbols.

	* tls/handshake/client-server/client.c (establish_protocol_version):
	Implement TLS 1.3 negotiation by supported_versions extension.

	* tls/handshake/message/shello.c (read_ext_list): Handle
	supported_versions extension processed earlier than other extensions.

	* tls/handshake/client-server/server.c (establish_protocol_version):
	Implement TLS 1.3 negotiation by supported_versions extension.
	* tls/handshake/message/chello.c (read_ext_list): Handle
	supported_versions extension processed earlier than other extensions.
	* tls/handshake/message/shello.c (write_version): Write protocol version
	in message.
	* tls/handshake/message/shello.c (write_extension): Call function to
	write supported_versions extension.

	* tls/handshake/message/shello.c (write_version): Use new protocol
	version symbols.

	* tls/handshake/message/chello.c (check_ext_availability_tls13): New
	function.
	* tls/handshake/message/chello.c (check_ext_availability): Call new
	function.
	* tls/handshake/message/shello.c (check_ext_availability_tls13_shello)
	(check_ext_availability_tls13_hrr): New functions.
	* tls/handshake/message/shello.c (check_ext_availability): Call new
	function.

	* tls/handshake/message/chello.c (check_ext_availability): Use new
	protocol version symbols.
	* b/tls/handshake/message/shello.c (check_ext_availability): Use new
	protocol version symbols.

	* tls/handshake/client-server/x-check_client.c (tls_hs_update_hash)
	(tls_hs_finished_compose): New stubs.

	* tls/handshake/client-server/client.c (write_certificate_tls13)
	(write_certificate_verify_tls13, write_finished_tls13)
	(read_encrypted_extensions_tls13, read_certificate_tls13)
	(read_certificate_request_tls13, read_certificate_verify_tls13)
	(read_finished_tls13): New functions.
	* tls/handshake/client-server/client.c (do_phase_hello)
	(do_phase_recv_cert_tls13)
	(do_phase_send_cert_tls13)
	(do_phase_final_tls13): Call new functions in each phase.

	* tls/handshake/client-server/server.c
	(write_encrypted_extensions_tls13, write_certificate_tls13)
	(write_certificate_verify_tls13, write_certificate_request_tls13)
	(write_finished_tls13, read_certificate_tls13)
	(read_certificate_verify_tls13, read_finished_tls13): New functions.
	* tls/handshake/client-server/server.c (do_phase_hello)
	(do_phase_send_cert_tls13, do_phase_recv_cert_tls13)
	(do_phase_final_tls13): Call new functions in each phase.

	* tls/Makefile.am: Add EncryptedExtensions message source file.
	* tls/handshake/message/encext.c: New file.
	* tls/include/tls_handshake.h: Add prototype of new functions.

	* tls/handshake/client-server/client.c (write_certificate_up_to_tls12)
	(write_certificate_verify_up_to_tls12)
	(write_client_key_exchange_up_to_tls12, read_certificate_up_to_tls12)
	(read_server_key_exchange_up_to_tls12)
	(read_certificate_request_up_to_tls12)
	(read_server_hello_done_up_to_tls12):Renamed from functions without
	_up_to_tls12 suffix.
	(do_phase_recv_cert_up_to_tls12, do_phase_send_cert_up_to_tls12): Call
	renamed functions.
	* tls/handshake/client-server/server.c (write_certificate_up_to_tls12)
	(write_server_key_exchange_up_to_tls12)
	(write_certificate_request_up_to_tls12)
	(write_server_hello_done_up_to_tls12, read_certificate_up_to_tls12)
	(read_client_key_exchange_up_to_tls12)
	(read_certificate_verify_up_to_tls12): Renamed from functions without
	_up_to_tls12 suffix.
	(do_phase_send_cert_up_to_tls12, do_phase_recv_cert_up_to_tls12): Call
	renamed functions.

	* tls/handshake/client-server/x-check_client.c
	(tls_util_convert_ver_to_protover, tls_util_convert_protover_to_ver):
	New stubs.

	* tls/include/tls.h: Rename state symbols about CertificateVerify.
	* tls/handshake/client-server/client.c (write_certificate_verify):
	Ditto.
	* tls/handshake/client-server/server.c (read_certificate_verify): Ditto.
	* tls/tls_handshake.c (tls_hs_change_state): Ditto.

	* tls/include/tls.h: Add states symbols for TLS 1.3 messages.

	* tls/include/tls.h: Add TLS 1.3 minor version symbol.

	* tls/include/tls_handshake.h: Add TLS 1.3 handshake message types.

	* tls/handshake/client-server/server.c (do_phase_hello): Fix typo.
	* tls/include/tls.h: Ditto.
	* tls/tls_cert.c (tls_cert_info_available): Ditto.

	* tls/handshake/client-server/client.c (do_phase_recv_cert_up_to_tls12)
	(do_phase_send_cert_up_to_tls12, do_phase_final_up_to_tls12): Renamed
	from function without _up_to_tls12 suffix.
	* tls/handshake/client-server/client.c (do_phase_recv_cert_tls13)
	(do_phase_recv_cert, do_phase_send_cert_tls13, do_phase_send_cert)
	(do_phase_final_tls13, do_phase_final): New functions.
	* tls/handshake/client-server/server.c (do_phase_send_cert_up_to_tls12)
	(do_phase_recv_cert_up_to_tls12, do_phase_final_up_to_tls12): Renamed
	from function without _up_to_tls12 suffix.
	* tls/handshake/client-server/server.c (do_phase_send_cert_tls13)
	(do_phase_send_cert, do_phase_recv_cert_tls13, do_phase_recv_cert)
	(do_phase_final_tls13, do_phase_final): New functions.

	* tls/include/extension/tls_ecc.h: Add new ecc groups to enum
	tls_hs_named_curve. Add comment.
	* tls/handshake/extension/ecc.c: Update default ecc group list.

	* tls/include/extension/tls_ecc.h: Rename enum tls_hs_named_curve from
	enum tls_hs_ecc_named_curve.
	* tls/include/tls_cert.h: Ditto.
	* tls/include/tls_handshake.h: Ditto.
	* tls/include/tls_handshake_ecdh.h: Ditto.
	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_get_named_curve): Ditto.
	* tls/handshake/ecdh/ecdhkey.c (get_ECParam_type)
	(tls_hs_ecdhkey_gen_for_server): Ditto.
	* tls/handshake/extension/ecc.c
	(write_elliptic_curve_list, save_eclist, check_named_curve_supported)
	(tls_hs_ecc_read_elliptic_curves, tls_hs_ecc_get_supported_eclist):
	Ditto.
	* tls/tls_cert.c (tls_cert_info_ecc_get_curve)
	(tls_cert_info_can_use_ecc_cipher_suite): Ditto.

	* tls/handshake/client-server/x-check_server.c
	(tls_util_convert_ver_to_protover, tls_util_convert_protover_to_ver)
	(tls_util_check_version_in_supported_version)
	(tls_hs_supported_versions_read): New stubs.

	* tls/handshake/message/chello.c (write_ext): Call function to write
	supported_versions extension.

	* tls/handshake/message/chello.c (write_client_version): Set client
	version and record version.

	* tls/handshake/client-server/server.c (establish_protocol_version):
	Implement TLS 1.2 negotiation by supported_versions.

	* tls/Makefile.am: Add supported_versions extension source file.
	* tls/handshake/extension/supported_versions.c: New file.
	* tls/include/extension/tls_supported_versions.h: Ditto.
	* tls/include/tls.h: Add variable storing peer supported_versions
	extension.
	* tls/include/tls_handshake.h: Add header inclusion.
	* tls/tls.c (TLS_free): Free peer supported_versions extension variable.

	* tls/tls_util.c (tls_util_check_version_in_supported_version): New
	function.
	* tls/include/tls_util.h: Add prototype of new functions.

	* tls/include/tls_cipher.h: Add new macro TLS_CIPHER_SUITES_SIZE_MAX.
	* tls/tls_cipher.c (merge_cipher_suite_list): New function.
	* tls/tls_cipher.c (tls_cipher_supported_list): Eliminate duplicated
	cipher suite elements in list.

	* tls/tls_util.c (tls_util_convert_ver_to_protover)
	(tls_util_convert_protover_to_ver): New function.
	* tls/include/tls_util.h: Add prototype of new functions.

2019-01-10  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Fix an undefined symbol problem on OI-Hipster
	2018.10. [#414]
	* ssl/Makefile.am: Ditto.
	* tls/Makefile.am: Ditto.

2018-12-21  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tls/handshake/message/finished.c (get_label_server): Fix a compiling
	problem on OpenIndiana Hipster 2018.10. [-Werror=maybe-uninitialized]

2018-10-28  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pkcs/pkcstestfc.c (test_pkcs_p8): Make sure that the test with
	pbeWithMD5AndDES-CBC is executed. [#406]
	* pkcs/pkcstestfc.c (p8e_rwfile): New function.

2018-10-23  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/message/chello.c (check_ext_availability): Add branches
	to switch by protocol version.
	* tls/handshake/message/shello.c (check_ext_availability): Ditto.

	* tls/handshake/message/chello.c (check_ext_availability_tls12):
	 Renamed from check_tls12_ext_availability().
	* tls/handshake/message/chello.c (check_ext_availability): Call renamed
	function.
	* tls/handshake/message/shello.c (check_ext_availability_tls12):
	Renamed from check_tls12_ext_availability().
	* tls/handshake/message/shello.c (check_ext_availability): Call renamed
	function.
	* tls/handshake/message/x-check_shello.c
	(test_check_ext_availability_tls12_failure_elliptic_curves)
	(test_check_ext_availability_tls12_normal_ec_point_formats)
	(test_check_ext_availability_tls12_failure_signature_algo)
	(check_ext_availability_tls12_suite, main): Rename functions affected by
	check_ext_availability_tls12().

	* tls/handshake/message/chello.c (write_cipher_suite): Fix error
	handling.
	* s/tls_cipher.c (tls_cipher_select): Ditto.
	* s/tls_cipher.c (tls_cipher_supported_list): Return protocol version
	list structure according to context.

	* tls/include/tls.h: Add new protocol version list structure. Add
	variable storing protocol version list to tls structure.
	* tls/tls.c: Add default protocol version list.
	* tls/tls.c (init_version): Initialize protocol version list structure.

	* tls/include/tls.h: Add new protocol version enum.

	* tls/handshake/message/helloreq.c (tls_hs_helloreq_compose): Fix
	segmentation fault. [#405]

	* tls/handshake/util/message.c (tls_hs_msg_free): Fix meaningless
	null clear. [#387]

	* tls/handshake/message/shello.c (tls_hs_shello_compose): Fix return
	value on error. [#381]

	* tls/include/tls_handshake.h: Add TLS 1.3 extensions to enum
	tls_extension_type.

	* tls/include/tls.h: Add TLS 1.3 cipher suites to enum tls_cipher_suite.

	* tls/handshake/message/x-check_chello.c
	(test_interpret_ext_list_normal)
	(test_interpret_ext_list_failure_elliptic_curves)
	(test_interpret_ext_list_failure_ec_point_formats)
	(test_interpret_ext_list_failure_ext_signature_algo)
	(test_tls_hs_chello_interpret_normal)
	(test_tls_hs_chello_interpret_failure_interpret_ext_list)
	(test_tls_hs_chello_interpret_failure_sighash_save_default): Set
	protocol version for tests affected by check_tls12_ext_availability().
	* tls/handshake/message/x-check_shello.c
	(test_check_tls12_ext_availability_failure_elliptic_curves)
	(test_check_tls12_ext_availability_normal_ec_point_formats)
	(test_check_tls12_ext_availability_failure_signature_algo)
	(check_tls12_ext_availability_suite, main): Rename functions affected
	by check_tls12_ext_availability().
	* tls/handshake/message/x-check_shello.c
	(test_interpret_ext_list_normal)
	(test_interpret_ext_list_failure_unsupported_extension)
	(test_interpret_ext_list_failure_read_ext_list)
	(test_tls_hs_shello_interpret_normal)
	(test_tls_hs_shello_interpret_failure_read_ext_list): Set protocol
	version for tests affected by check_tls12_ext_availability().

	* tls/handshake/message/chello.c (check_tls12_ext_availability): Renamed
	from check_ext_availability().
	* tls/handshake/message/chello.c (check_ext_availability): New function.
	* tls/handshake/message/chello.c (interpret_ext_list): Call new
	check_ext_availability().
	* tls/handshake/message/shello.c (check_tls12_ext_availability): Renamed
	from check_ext_availability().
	* tls/handshake/message/shello.c (check_ext_availability): New function.
	* tls/handshake/message/shello.c (interpret_ext_list): Call new
	check_ext_availability().

2018-10-22  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pkcs/pkcs8.c (ASN1_p8_prvkey): Guarantee backword compatibility
	with AiCrypto 3.3 or earlier with respect to the type ECPrivateKey.

2018-10-17  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pkcs/pkcs8.c (ASN1_p8_prvkey): Follow RFC 5208 with respect to
	ECPrivateKey that is defined in RFC 5915.

2018-10-16  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pkcs/pkcs8.c (P8_toDER): Follow RFC 5208 with respect to
	ECPrivateKey that is defined in RFC 5915.

2018-10-09  OHASHI Hiroki  <hiroki@soum.co.jp>

	* tls/handshake/message/x-check_shello.c
	(test_tls_hs_shello_compose_failure_write_version)
	(test_tls_hs_shello_compose_failure_write_server_random)
	(test_tls_hs_shello_compose_failure_write_session_id)
	(test_tls_hs_shello_compose_failure_write_cipher_suite)
	(test_tls_hs_shello_compose_failure_write_cmp_method)
	(test_tls_hs_shello_compose_failure_write_extension): Fix tests affected
	by return value of tls_hs_shello_compose().

	* tls/handshake/message/shello.c (tls_hs_shello_compose): Fix return
	value on error. [#381]

	* tls/handshake/message/chello.c (interpret_cmp_method): Modify error
	handling.

	* tls/handshake/message/shello.c (read_cmp_method): Fix alert. [#404]

	* tls/Makefile.am: Add new unit test files.
	* tls/handshake/client-server/x-check_client.c: New file.
	* tls/handshake/client-server/x-check_server.c: Ditto.

	* tls/handshake/message/x-check_shello.c
	(test_tls_hs_shello_parse_failure_unexpected_message)
	(test_tls_hs_shello_parse_failure_read_version)
	(test_tls_hs_shello_parse_failure_read_server_random)
	(test_tls_hs_shello_parse_failure_read_session_id)
	(test_tls_hs_shello_parse_failure_read_cipher_suite)
	(test_tls_hs_shello_parse_failure_read_cmp_method)
	(test_tls_hs_shello_parse_failure_read_extension)
	(test_tls_hs_shello_parse_failure_read_whole_message)
	(test_interpret_session_id_normal)
	(test_interpret_session_id_normal_same_session_id)
	(test_interpret_session_id_normal_different_session_id_len)
	(test_interpret_session_id_normal_different_session_id_value)
	(test_interpret_session_id_failure_get_session)
	(test_interpret_cipher_suite_normal)
	(test_interpret_cipher_suite_failure_cipher_set)
	(test_interpret_cmp_method_normal)
	(test_interpret_cmp_method_failure_compress_set)
	(test_interpret_ext_list_normal)
	(test_interpret_ext_list_failure_unsupported_extension)
	(test_interpret_ext_list_failure_read_ext_list)
	(test_tls_hs_shello_interpret_normal)
	(test_tls_hs_shello_interpret_failure_session_id)
	(test_tls_hs_shello_interpret_failure_failure_cipher_set)
	(test_tls_hs_shello_interpret_failure_compress_set)
	(test_tls_hs_shello_interpret_failure_read_ext_list): New test cases.
	* tls/handshake/message/x-check_shello.c
	(interpret_session_id_suite, interpret_cipher_suite_suite)
	(interpret_cmp_method_suite, interpret_ext_list_suite)
	(tls_hs_shello_interpret_suite): New suites.
	* tls/handshake/message/x-check_shello.c (tls_hs_shello_parse_suite):
	Add new test cases.
	* tls/handshake/message/x-check_shello.c (main): Add new suites.

	* tls/handshake/message/x-check_chello.c
	(test_interpret_session_id_normal_new_session)
	(test_interpret_session_id_normal_resession)
	(test_interpret_session_id_failure_get_session)
	(test_interpret_cmp_method_normal)
	(test_interpret_cmp_method_failure_unknown_method)
	(test_interpret_ext_list_normal)
	(test_interpret_ext_list_failure_elliptic_curves)
	(test_interpret_ext_list_failure_ec_point_formats)
	(test_interpret_ext_list_failure_ext_signature_algo)
	(test_tls_hs_chello_interpret_normal)
	(test_tls_hs_chello_interpret_failure_interpret_session_id)
	(test_tls_hs_chello_interpret_failure_interpret_cmp_method)
	(test_tls_hs_chello_interpret_failure_interpret_ext_list)
	(test_tls_hs_chello_interpret_failure_sighash_save_default): New test
	cases.
	* tls/handshake/message/x-check_chello.c
	(interpret_session_id_suite, interpret_cmp_method_suite)
	(interpret_ext_list_suite, tls_hs_chello_interpret_suite): New suites.
	* tls/handshake/message/x-check_chello.c (main): Add new suites.

	* tls/handshake/message/x-check_shello.c
	(test_read_session_id_normal, test_read_cipher_suite_normal)
	(test_read_cmp_method_normal, test_read_extension_normal)
	(test_read_extension_normal_no_extension): Refactor tests.
	* tls/handshake/message/x-check_shello.c
	(test_read_session_id_normal_same_session_id)
	(test_read_session_id_normal_different_session_id_len)
	(test_read_session_id_normal_different_session_id_value)
	(test_read_session_id_failure_get_session)
	(test_read_cipher_suite_failure_cipher_set)
	(test_read_cmp_method_failure_compress_set)
	(test_read_extension_failure_unsupported_extension)
	(test_read_extension_failure_read_ext_list): Remove functions.
	* tls/handshake/message/x-check_shello.c (read_session_id_suite)
	(read_cipher_suite_suite, read_cmp_method_suite, read_extension_suite):
	Remove test cases.

	* tls/handshake/message/x-check_chello.c
	(test_read_session_id_normal_new_session)
	(test_read_session_id_normal_resession)
	(test_tls_hs_chello_parse_normal_tls12)
	(test_tls_hs_chello_parse_normal): Refactor tests.
	* tls/handshake/message/x-check_chello.c
	(test_read_session_id_failure_get_session)
	(test_read_cmp_method_failure_unknown_method)
	(test_tls_hs_chello_parse_failure_args_null)
	(test_tls_hs_chello_parse_normal_sighash_save_default)
	(test_tls_hs_chello_parse_failure_sighash_save_default): Remove
	functions.
	* tls/handshake/message/x-check_chello.c (read_session_id_suite)
	(read_cmp_method_suite, tls_hs_chello_parse_suite): Remove test cases.
	* tls/handshake/message/x-check_chello.c (test_read_ext_normal): New
	test.
	* tls/handshake/message/x-check_chello.c (read_ext_suite): Add a new
	suite.

	* tls/handshake/message/x-check_chello.c (setup_tls): Initialize new
	variables.
	* tls/handshake/message/x-check_chello.c (teardown_tls): Finalize new
	variables.
	* tls/handshake/message/x-check_chello.c
	(test_check_client_version_normal_tls12, check_client_version_suite)
	(test_read_client_version_failure_protocol_version): Remove functions.
	* tls/handshake/message/x-check_chello.c (read_client_version_suite):
	Remove test case.
	* tls/handshake/message/x-check_chello.c (main): Remove test suite.
	* tls/handshake/message/x-check_chello.c (tls_extension_init)
	(tls_extension_free, tls_hs_interim_params_init)
	(tls_hs_interim_params_free): New stubs.
	* tls/handshake/message/x-check_shello.c (setup):  Initialize new
	variables.
	* tls/handshake/message/x-check_shello.c (teardown): Finalize new
	variables.
	* tls/handshake/message/x-check_shello.c
	(test_read_version_normal_tls12): Modify test target variables.
	* tls/handshake/message/x-check_shello.c
	(test_read_version_failure_protocol_version_major)
	(test_read_version_failure_protocol_version_minor): Remove functions.
	* tls/handshake/message/x-check_shello.c (read_version_suite): Remove
	test cases.
	* tls/handshake/message/x-check_shello.c (tls_extension_init)
	(tls_extension_free, tls_hs_interim_params_init)
	(tls_hs_interim_params_free): New stubs.

	* tls/handshake/message/chello.c (read_cmp_method): Fix address bug.

	* tls/handshake/message/shello.c (read_session_id): Fix offset bug.

	* tls/include/tls.h: Add variable that hold record version to tls
	structure.
	* tls/tls.c (init_version): Initialize record_version in tls structure.
	* tls/tls_record.c (check_record_version, write_record_version): Use
	record version in tls structure.
	* tls/handshake/message/chello.c (write_client_version): Set initial
	record version.
	* tls/handshake/client-server/client.c (establish_protocol_version):
	Set record version according to negotiated version.
	* tls/handshake/client-server/server.c (establish_protocol_version):
	Ditto.

	* tls/handshake/client-server/client.c (establish_protocol_version):
	Renamed from check_protocol_version(). Merge other functions.
	* tls/handshake/client-server/client.c (do_phase_hello): Rename
	establish_protocol_version() from check_protocol_version().
	* tls/handshake/client-server/server.c (establish_protocol_version):
	Renamed from check_protocol_version(). Merge other functions.
	* tls/handshake/client-server/server.c (do_phase_hello): Rename
	establish_protocol_version() from check_protocol_version().
	* tls/handshake/message/chello.c (check_client_version)
	(tls_hs_chello_version_check): Remove functions and merge to
	establish_protocol_version().
	* tls/handshake/message/shello.c (check_negotiated_version)
	(tls_hs_shello_version_check): Remove functions and merge to
	establish_protocol_version().
	* tls/tls_handshake.c (tls_hs_version_select, tls_hs_version_validate):
	Remove functions and merge to establish_protocol_version().

	* tls/include/tls_handshake.h: Rename enum tls_hello_extension to enum
	tls_extension_type.
	* tls/handshake/extension/ecc.c (tls_hs_ecc_write_elliptic_curves)
	(tls_hs_ecc_write_ec_point_formats): Ditto.
	* tls/handshake/message/chello.c (check_ext_availability)
	(write_ext_sigalgo, read_ext_list): Ditto.
	* tls/handshake/message/shello.c (check_ext_availability)
	(read_ext_list): Ditto.
	* tls/handshake/message/x-check_chello.c
	(test_read_ext_list_normal_elliptic_curves)
	(test_read_ext_list_failure_elliptic_curves)
	(test_read_ext_list_normal_ec_point_formats)
	(test_read_ext_list_failure_ec_point_formats)
	(test_read_ext_list_normal_ext_signature_algo)
	(test_read_ext_list_failure_ext_signature_algo): Ditto.
	* tls/handshake/message/x-check_shello.c
	(test_check_ext_availability_failure_elliptic_curves)
	(test_check_ext_availability_normal_ec_point_formats)
	(test_check_ext_availability_failure_signature_algo)
	(test_read_ext_list_normal_ec_point_formats)
	(test_read_ext_list_failure_ecc_read_point_format)
	(test_read_ext_list_failure_elliptic_curves)
	(test_read_ext_list_failure_signature_algo): Ditto.

	* tls/tls_handshake.c (check_handshake_type): Rename from
	check_handshahke_type().

	* tls/include/tls.h: Fix typo.

	* tls/handshake/message/chello.c (tls_hs_chello_compose): Fix typo.
	* tls/handshake/message/shello.c (tls_hs_shello_compose): Ditto.

	* tls/handshake/client-server/client.c (check_protocol_version)
	(interpret_server_hello): New functions.
	* tls/handshake/client-server/client.c (do_phase_hello): Separate
	negotiation and interpretation process into new functions.
	* tls/handshake/message/shello.c (interpret_session_id)
	(interpret_cipher_suite, interpret_cmp_method, interpret_ext_list)
	(tls_hs_shello_version_check, tls_hs_shello_interpret): New functions.
	* tls/handshake/message/shello.c (read_version, read_session_id)
	(read_cipher_suite, read_cmp_method, read_extension): Separate
	interpretation process into new functions.
	* tls/include/tls_handshake.h: Add prototype of new functions and new
	variable to tls_hs_interim_params structure.
	* tls/tls_handshake.c (tls_hs_version_validate): New function.

	* tls/handshake/client-server/server.c (select_protocol_version)
	(interpret_client_hello): New functions.
	* tls/handshake/client-server/server.c (do_phase_hello): Separate
	negotiation and interpretation process into new functions.
	* tls/handshake/message/chello.c (interpret_session_id)
	(interpret_cmp_method, interpret_ext_list, tls_hs_chello_version_check)
	(tls_hs_chello_interpret): New functions.
	* tls/handshake/message/chello.c (read_client_version)
	(read_session_id, read_cmp_method, read_ext): Separate interpretation
	process into new functions.
	* tls/tls_handshake.c (tls_hs_version_select): New function.
	* tls/include/tls_handshake.h: Add new prototype of functions.

	* tls/include/tls.h: Add interim_params to tls structure.
	* tls/tls.c (init_interim_params, free_interim_params): New functions.
	* tls/tls.c (init_handshake): Add interim_params initialization.
	* tls/tls.c (tls_free_connection): Add interim_params finalization.

	* tls/include/tls_handshake.h: New structure and functions for
	interim parameters during parse.
	* tls/tls_handshake.c (tls_hs_interim_params_init)
	(tls_hs_interim_params_free): New functions.

	* tls/include/tls_handshake.h: New structure and functions for
	extension.
	* tls/tls_handshake.c (tls_extension_init, tls_extension_free): New
	functions.

2018-09-21  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 3.4
	* configure.ac: Bump up the minor version number.

2018-09-19  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pem/pem_key.c (PEM_read_ecdsaprv_2der): Follow RFC 5915, Section 4.
	* pem/pem_w.c (PEM_write_ecdsaprv): Likewise.

2018-08-22  SAKANE Eisaku  <sakane@nii.ac.jp>

	* ecdsa/ecdsatestfc.c: Replace the RFC5915-incompatible key.
	* pem/pemtestfc.c: Ditto.
	* test/ecdsa_rfc5915.key: New file for testing the ecdsa module.
	* test/ecdsakey_rfc5915.pem: New file for testing the pem module.
	* test/Makefile.am: Make modification accordingly.

2018-08-02  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/asn1_ecdsa.c (conv_bit_to_octetstring): Fix a bug in making
	a copy.

2018-07-27  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/asn1_ecdsa.c (conv_bit_to_octetstring): Change the signature.
	* asn1/asn1_ecdsa.c (ASN1_read_ecdsaprv): Make modification accordingly.

2018-07-25  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tool/io.c (ai_malloc, ai_free): Remove unused functions.

2018-07-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/asn1_rsa.c (ASN1_XXX2LNm): New function that extends
	original ASN1_int2LNm() function.
	* aicrypto/ok_asn1.h (ASN1_int2LNm): Redefine as mecro.
	* aicrypto/ok_asn1.h (ASN1_OS2LNm): New function defined as macro.
	* asn1/asn1_ecdsa.c (conv_bit_to_octetstring): New function.
	* asn1/asn1_ecdsa.c (ASN1_read_ecdsaprv): Follow RFC 5915 now and
	also maintain backward compatibility.
	* ecdsa/ecdsatestfc.c (test_ecdsakey_der): Skip the code block for
	comparing two EC private keys (DER-encoded data) for the moment.

2018-07-06  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 3.3
	* configure.ac: Bump up the minor version number.

2018-07-04  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tool/test_digest.c: Fix not to run the MD2 test function if MD2
	is disabled.

2018-07-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/asn1_rsa.c (ASN1_LNm2XXX): New function that extends
	original ASN1_LNm2int() function.
	* aicrpyto/ok_asn1.h (ASN1_LNm2int): Redefine as macro.
	* aicrypto/ok_asn1.h (ASN1_LNm2OS): New function defined as macro.
	* ecdsa/ecdsa_asn1.c (ECDSAprv_toDER): Use the function ASN1_LNmOS().

2018-07-02  SAKANE Eisaku  <sakane@nii.ac.jp>

	* ecdsa/ecdsa_asn1.c (ECDSAprv_toDER): Fix to be compatible with
	RFC 5915. [#328]
	* ecdsa/ecdsa_asn1.c (conv_octet_to_bitstring): New function.
	* ecdsa/ecdsa_asn1.c (ECDSAprv_estimate_der_size): Change intial
	value with a margin, but groundless.

2018-06-27  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Add a new option "--enable-spkac". Currently this
	feature is enabled but will be disabled in the future.
	* Makefile.am: Make modification accordingly.
	* asn1/Makefile.am: Ditto.
	* x509/x509_file.c (read_x509_file): Ditto.
	* test/Makefile.am: Ditto.

2018-04-06  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rsa/rsa.c (RSA_get_encoding_method): Add two legacy signature
	algorithms for SPKAC test suite. [#390]

2018-04-05  SAKANE Eisaku  <sakane@nii.ac.jp>

	* kdf/Makefile.am: Fix an unresolved symbols problem that arises
	if legacy hash functions are enabled.

2018-01-12  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/x-check_chello.c
	(test_tls_hs_chello_parse_failure_args): Removed the test case that
	using uninitialized variable.
	(tls_hs_chello_parse_suite): Modification following the above.

	* tls/handshake/util/x-check_message.c
	(test_tls_hs_msg_write_2_normal_realloc)
	(test_tls_hs_msg_write_3_normal_realloc): fix problems detected by
	Valgrind.
	* tls/handshake/message/x-check_chello.c
	(test_read_client_version_failure_argument_null)
	(test_read_client_random_failure_argument_null): Ditto.

	* tls/handshake/util/x-check_message.c (test_tls_hs_msg_free_normal):
	Fix test failure on OS X(x86_64) [#385]

	* tls/handshake/message/x-check_chello.c (read_client_version_suite)
	(read_client_random_suite, tls_hs_chello_parse_suite):
	modify to fix memory leak.
	(test_read_client_version_failure_argument_null)
	(test_read_client_random_failure_argument_null)
	(test_tls_hs_chello_parse_failure_args_null): make to silence the
	warning issued by the option "-Wunused-function".

	* tls/handshake/message/x-check_shello.c (read_ext_list_suite):
	modify to fix memory leak.
	(test_read_ext_list_failure_elliptic_curves)
	(test_read_ext_list_failure_signature_algo): comments fixes.

2018-01-11  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_util.c (tls_util_asn1_length): Fix a compiling problem.
	[#386]

2018-01-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Add a new option --with-check-prefix.

2018-01-04  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tool/lock.c: Fix an error reported by CppCheck,
	'(error) #endif without #if'.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_list): Fix a
	memory leak.
	* tls/handshake/util/message.c (tls_hs_msg_list): Ditto.
	* tls/tls_cert.c (tls_cert_type_list): Ditto.
	* tls/tls_record.c (tls_record_list): Ditto.

2017-12-27  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/util/x-check_message.c (read_client_random_suite):
	Correct missed setting of test case.

	* README.en: Add about new feature.
	* README.ja: Ditto.

2017-12-26  TAKANDO Takashi  <takando@soum.co.jp>

	* asn1/asn1_print.c (switch_str): Add "id-RSASSA-PSS".

	* tls/Makefile.am (TESTS, check_PROGRAMS): Modify the execution order
	of tests.

2017-12-25  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 3.2.1
	* configure.ac: Bump up the patch version number.

2017-12-25  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/util/x-check_message.c: New file.
	* tls/Makefile.am: Modify it accordingly.

2017-12-22  TAKANDO Takashi  <takando@soum.co.jp>

	* chacha/djb/ecrypt-machine.h: Fix a compiling	problem on Raspbian 9.1
	[#378]

	* tls/handshake/message/x-check_shello.c: New file.
	* tls/Makefile.am: Modify it accordingly.

2017-12-20  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/x-check_tls_util.c: New file.
	* tls/Makefile.am: Modify it accordingly.

2017-12-19  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/x-check_chello.c: New file.
	* tls/Makefile.am: Modify it accordingly.

2017-12-08  TAKANDO Takashi  <takando@soum.co.jp>

	* configure.ac: added new option --enable-unit-testing.

2017-12-07  TAKANDO Takashi  <takando@soum.co.jp>

	* configure.ac: Fix a compiling	problem rsa/test [#377].
	* rsa/Makefile.am: Likewise.
	* rsa/test/Makefile.am: Likewise.
	* rsa/rsa_pss.c (ceiling): Modify the inline function declaration to
	'static'.

2017-12-05  TAKANDO Takashi  <takando@soum.co.jp>

	* chacha/chacha20_poly1305.c (chacha20_poly1305_encrypt): New arg
	datalen.
	* aicrypto/nrg_chacha.h (chacha20_poly1305_encrypt): Modify it
	accordingly.
	* chacha/chacha20_poly1305testfc.c (test_AEAD_Construction): Ditto.

	* chacha/djb/chacha-macros.h: Rename to ...
	* chacha/djb/chacha.h: ... this.
	* chacha/djb/chacha.c: Modify it accordingly.
	* chacha/chacha.c: Ditto.
	* chacha/chachatestfc.c: Ditto.

2017-12-04  TAKANDO Takashi  <takando@soum.co.jp>

	* rsa/test/siggenPSStest.c (check_verify): New function.
	(test_rsa_sig): Fixed according to the above changes.

	* aicrypto/ok_err.h (ERR_ST_RSA_INCONSISTENT): Macro defined.
	* tool/error.c (get_err_type): Fixed according to the above changes.
	* aicrypto/ok_rsa.h (RSA_PSS_verify): New function.
	* rsa/rsa_pss.c (RSA_PSS_verify): New function.
	* tool/sigalgo.c (obj_sig2hash): Fixed according to the above changes.

	* tool/signature.c (NRG_do_verify): Add new function.
	(OK_do_verify): Delegate to NRG_do_verify.
	* aicrypto/ok_tool.h (NRG_do_signature): New function.

2017-11-30  TAKANDO Takashi  <takando@soum.co.jp>

	* rsa/test/siggen15test.c (check_verify): New function.
	(test_rsa_sig): Fixed according to the above changes.

2017-11-27  TAKANDO Takashi  <takando@soum.co.jp>

	* rsa/Makefile.am (SUBDIRS): defined.
	* rsa/test/Makefile.am: New file.
	* rsa/test/siggen15_2_1024_testfc.c: New file.
	* rsa/test/siggen15_2_1536_testfc.c: New file.
	* rsa/test/siggen15_2_2048_testfc.c: New file.
	* rsa/test/siggen15_2_3072_testfc.c: New file.
	* rsa/test/siggen15_2_4096_testfc.c: New file.
	* rsa/test/siggen15_3_2048_testfc.c: New file.
	* rsa/test/siggen15_3_3072_testfc.c: New file.
	* rsa/test/siggen15_3_TruncatedSHAs_2048_testfc.c: New file.
	* rsa/test/siggen15_3_TruncatedSHAs_3072_testfc.c: New file.
	* rsa/test/siggen15test.c: New file.
	* rsa/test/siggen15test.h: New file.
	* rsa/test/siggenPSS_2_1024_testfc.c: New file.
	* rsa/test/siggenPSS_2_1536_testfc.c: New file.
	* rsa/test/siggenPSS_2_2048_testfc.c: New file.
	* rsa/test/siggenPSS_2_3072_testfc.c: New file.
	* rsa/test/siggenPSS_2_4096_testfc.c: New file.
	* rsa/test/siggenPSS_3_2048_testfc.c: New file.
	* rsa/test/siggenPSS_3_3072_testfc.c: New file.
	* rsa/test/siggenPSS_3_TruncatedSHAs_2048_testfc.c: New file.
	* rsa/test/siggenPSS_3_TruncatedSHAs_3072_testfc.c: New file.
	* rsa/test/siggenPSStest.c: New file.
	* rsa/test/siggenPSStest.h: New file.

2017-11-24  TAKANDO Takashi  <takando@soum.co.jp>

	* aicrypto/ok_err.h (ERR_PT_RSAPSS): Macro defined.
	(ERR_ST_RSA_MSGTOOLONG, ERR_ST_RSA_ENCODING, ERR_ST_RSA_MSKTOOLONG):
	Macro defined.
	* tool/error.c (get_err_location, get_err_type): Fixed according to
	the above changes.
	* aicrypto/ok_rsa.h: Dox fixes.
	* rsa/rsa_pss.c (RSA_PSS_encode, MGF1) : Add error handling.

	* aicrypto/ok_rsa.h [RSA_DEBUG] (RSA_DPRINTF): Macro defined.
	* rsa/rsa_pss.c [RSA_DEBUG] (dump): New function.
	(RSA_PSS_params_set, RSA_PSS_params_set_recommend)
	(RSA_PSS_params_set_maskGenAlgorithm, RSA_PSS_params_set_saltLength)
	(RSA_PSS_sign_digest, RSA_PSS_encode, MGF1) [RSA_DEBUG]: Add debug
	messages.

2017-11-22  TAKANDO Takashi  <takando@soum.co.jp>

	* rsa/rsa_pss.c: New file.
	* aicrypto/ok_rsa.h: Fixed according to the above changes.
	* rsa/Makefile.am: Ditto.

	* tool/signature.c (NRG_do_signature): Add new function.
	(OK_do_signature): Delegate to NRG_do_signature.
	* aicrypto/ok_tool.h (NRG_do_signature): New function.

2017-11-21  TAKANDO Takashi  <takando@soum.co.jp>

	* aicrypto/ok_rsa.h (RSA_EMSA_PSS, RSA_EMSA_PKCS1): New macro.
	(RSA_get_encoding_method): New function.
	* rsa/rsa.c: include aicrypto/ok_asn1.h.
	(RSA_get_encoding_method): New function.

	* aicrypto/ok_asn1.h (OBJ_SIG_SHA1RSA_PKCS1): Define alias.
	(OBJ_SIG_SHA224RSA_PKCS1, OBJ_SIG_SHA256RSA_PKCS1)
	(OBJ_SIG_SHA384RSA_PKCS1, OBJ_SIG_SHA512RSA_PKCS1)
	(OBJ_SIG_SHA512224RSA_PKCS1, OBJ_SIG_SHA512256RSA_PKCS1): Ditto.
	(OBJ_SIG_SHA1RSA_PSS): New macro.
	(OBJ_SIG_SHA224RSA_PSS, OBJ_SIG_SHA256RSA_PSS, OBJ_SIG_SHA384RSA_PSS)
	(OBJ_SIG_SHA512RSA_PSS, OBJ_SIG_SHA512224RSA_PSS)
	(OBJ_SIG_SHA512256RSA_PSS): Ditto.
	(OBJ_MGF1_SHA1, OBJ_MGF1_SHA224, OBJ_MGF1_SHA256, OBJ_MGF1_SHA384)
	(OBJ_MGF1_SHA512, OBJ_MGF1_SHA512224, OBJ_MGF1_SHA512256): Ditto.
	* x509/cert_tool.c (set_digalgo_from_sigalgo): Fixed according to
	the above changes.

2017-11-06  TAKANDO Takashi  <takando@soum.co.jp>

	* rsa/Makefile.am: Add comment about 'make check'.
	* rsa/rsatestfc.c (test_rsa_pubprv): Silence the warning issued by
	the option "-Wpointer-sign".

2017-11-02  TAKANDO Takashi  <takando@soum.co.jp>

	* chacha/chacha20_poly1305.c (chacha20_poly1305_encrypt): Fix an
	endianness problem on PowerPC(32-bit) [#375]

	* poly1305/poly1305testfc.c [POLY1305_DEBUG]: Define constant to
	compile for debugging.

2017-10-30  TAKANDO Takashi  <takando@soum.co.jp>

	* chacha/chachatestfc.c [CHACHA_DEBUG]: Define constant to compile for
	debugging.
	* chacha/chacha20_poly1305testfc.c [CHACHA_DEBUG]: Ditto.

	* aicrypto/nrg_chacha.h (ChaCha20_serialize): Fix a compiling
	problem on OS X (x86_64) [-Wundefined-inline] [#374]
	* chacha/chacha.c (ChaCha20_serialize): Ditto.

2017-10-27  TAKANDO Takashi  <takando@soum.co.jp>

	* kdf/hkdftest.c: New file.
	* kdf/hkdftest.h: New file.
	* kdf/hkdftestfc.c: New file.

	* aicrypto/nrg_kdf.h: New file.
	* kdf/Makefile.am: New file.
	* kdf/hkdf.c: New file.
	* Makefile.am: Fixed according to the above changes.
	* aicrypto/Makefile.am: Diito.
	* configure.ac: Diito.

2017-10-26  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rc2/test_rrc2.c: Removed because test vectors could not be reliable.
	* rc2/Makefile.am: Make modification accordingly.
	* rc2/rc2test.c: Likewise.
	* rc2/test_rfc2268.c (test_rfc2268): Fix an endian problem.

2017-10-24  TAKANDO Takashi  <takando@soum.co.jp>

	* chacha/chacha20_poly1305test.c: New file.
	* chacha/chacha20_poly1305test.h: New file.
	* chacha/chacha20_poly1305testfc.c: New file.

	* chacha/chacha20_poly1305.c: New file.
	* aicrypto/nrg_chacha.h: Fixed according to the above changes.
	* chacha/Makefile.am: Ditto.

	* poly1305/README.poly1305-donna: New file.
	* poly1305/poly1305test.c: New file.
	* poly1305/poly1305test.h: New file.
	* poly1305/poly1305testfc.c: New file.
	* poly1305/poly1305-donna/poly1305-donna-64.h (poly1305_copy_r)
	(poly1305_copy_h) : Add new function.
	* poly1305/poly1305-donna/poly1305-donna-32.h (poly1305_copy_r)
	(poly1305_copy_h) : Ditto.
	* poly1305/poly1305-donna/poly1305-donna.h: Fixed according to
	the above changes.

	* poly1305/poly1305.c: New file.
	* poly1305/Makefile.am: New file.
	* aicrypto/nrg_poly1305.h: New file.
	* Makefile.am: Fixed according to the above changes.
	* aicrypto/Makefile.am: Diito.
	* configure.ac: Diito.

2017-10-23  TAKANDO Takashi  <takando@soum.co.jp>

	* poly1305/poly1305-donna/poly1305-donna.c:
	* chacha/djb/chacha.c: Import the public domain library from
	https://github.com/floodyberry/poly1305-donna .
	* poly1305/poly1305-donna/poly1305-donna.h: Ditto.
	* poly1305/poly1305-donna/poly1305-donna-32.h: Ditto.
	* poly1305/poly1305-donna/poly1305-donna-64.h: Ditto.

2017-10-19  TAKANDO Takashi  <takando@soum.co.jp>

	* aicrypto/nrg_chacha.h: New file.
	* chacha/Makefile.am: New file.
	* chacha/chacha.c: New file.
	* chacha/chachatest.c: New file.
	* chacha/chachatest.h: New file.
	* chacha/chachatestfc.c: New file.
	* Makefile.am: Fixed according to the above changes.
	* aicrypto/Makefile.am: Diito.
	* configure.ac: Diito.

	* chacha/Readme.djb: New file.
	* chacha/djb/chacha.c (ROTATE, XOR, PLUS, PLUSONE, QUARTERROUND):
	Move macros.  Moved to ...
	* chacha/djb/chacha-macros.h: ... here, New file.

	* chacha/djb/chacha.c: Import ChaCha reference implementation from
	https://cr.yp.to/chacha.html.
	* chacha/djb/ecrypt-sync.h: Ditto.
	* chacha/djb/ecrypt-config.h: Ditto.
	* chacha/djb/ecrypt-machine.h: Ditto.
	* chacha/djb/ecrypt-portable.h: Ditto.

2017-10-18  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rc2/rc2test.c: Temporarily disable test vectors provided by RFC 2268.

2017-08-10  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 3.2
	* configure.ac: Bump up the minor version number.

2017-07-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tls/tls_cipher.c (tls_cipher, tls_decipher): Fix a compiling
	problem on OpenIndiana Hipster 2017.04. [-Werror=maybe-uninitialized]
	* tls/handshake/extension/ecc.c
	(tls_hs_ecc_write_ec_point_formats): Likewise.
	* tls/handshake/message/ckeyexc.c (read_exchange_keys): Likewise.

2017-07-01  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_pkcs11.h: Add a new macro NRG_CKM_SIGNING.
	* pkcs/p11_key.c (P11RSAprv_doCrypt): Rewrite the relevant code
	block accordingly.
	* tool/signature.c (P1_sign_digest): Likewise.

2017-03-30  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_session.c (session_clean): Bug fix [#342].
	* aicrypto/nrg_queue.h: New file.
	* aicrypto/Makefile.am (pkginclude_HEADERS): Make
	modification accordingly.
	* tls/include/tls_handshake.h: Ditto.
	* tls/include/tls_record.h: Ditto.
	* tls/include/tls_session.h: Ditto.

2017-03-29  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Bump up CURRENT and AGE respectively.
	* tls/Makefile.am: Ditto.

2017-03-24  TAKANDO Takashi  <takando@soum.co.jp>

	* configure.ac: Set no-dependencies option.

2017-03-21  TAKANDO Takashi  <takando@soum.co.jp>

	* configure.ac: Add SHA-3 family for DEFAULT_SIG_TYPE.

	* sha3/Makefile.am: Change the source file to compile.

2017-03-20  TAKANDO Takashi  <takando@soum.co.jp>

	* tool/sigalgo.c (select_sigalgo, obj_sig2hash): Remove
	OBJ_SIG_SHA3_384DSA, OBJ_SIG_SHA3_512DSA from supported algorithm.

2017-03-14  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/certreq.c (read_cert_sigalgo): Add new function.
	(tls_hs_certreq_parse): Make modification accordingly.

	* aicrypto/nrg_sha3.h: Comment fixes.

2017-03-10  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_cert.c (TLS_cert_verify): Delete a redundant error message.

	* tls/handshake/extension/sighash.c (tls_hs_sighash_read): Bug fix.

	* tls/handshake/message/cert.c (check_cert_sighash): Add useful
	information for debugging.

2017-03-09  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls.c (TLS_free): Remove error setting.

2017-03-02  TAKANDO Takashi  <takando@soum.co.jp>

	* dsa/dsa_gen.c (DSAPm_gen_parameter): Add hash algorithm check.

2017-02-23  TAKANDO Takashi  <takando@soum.co.jp>

	* aicrypto/ok_asn1.h: Support signature algorithms
	OBJ_SIG_SHA384DSA, OBJ_SIG_SHA512DSA.
	* asn1/asn1_obj.c (ASN1_object_2int, ASN1_int_2object): Ditto.
	* asn1/asn1_print.c (switch_str): Ditto.
	* x509/cert_print.c (print_sig_algo): Ditto.
	* x509/cert_tool.c (set_digalgo_from_sigalgo): Ditto.

2017-02-21  TAKANDO Takashi  <takando@soum.co.jp>

	* sha3/sha3testfc.c: Add new test using NIST test vector.
	(test_sha3_224, test_sha3_256, test_sha3_384, test_sha3_512)
	(test_shake128, test_shake256) : Make modification accordingly.
	* sha3/sha3testnist.c: New file.
	* sha3/sha3testnist.h: New file.
	* sha3/Makefile.am (noinst_HEADERS, sha3_test_SOURCES): Make
	modification accordingly.
	* sha3/sha3test.c (main): Make modification accordingly.

2017-02-20  TAKANDO Takashi  <takando@soum.co.jp>

	* sha3/sha3testfc.c (test_sha3_kcp_vector): Rename from 'test_sha3'.
	Change to continue even without keccak test vector file.
	(test_sha3_224, test_sha3_256, test_sha3_384, test_sha3_512)
	(test_shake128, test_shake256) : Make modification accordingly.

2017-02-17  TAKANDO Takashi  <takando@soum.co.jp>

	* aicrypto/ok_asn1.h: Support signature algorithms with SHA-3 family.
	* asn1/asn1_obj.c (ASN1_object_2int, ASN1_int_2object): Ditto.
	* asn1/asn1_print.c (switch_str): Ditto.
	* tool/sigalgo.c (select_sigalgo, obj_sig2hash): Ditto.
	* x509/cert_print.c (print_sig_algo): Ditto.
	* x509/cert_tool.c (set_digalgo_from_sigalgo): Ditto.

2017-02-14  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pkcs/pkcstestfc.c (test_pkcs_p11): Separate PKCS#11 tests from
	the source file.
	* pkcs/test-pkcs11.c: New file.
	* test/Makefile.am: Make modification accordingly.

2017-02-14  TAKANDO Takashi  <takando@soum.co.jp>

	* asn1/asn1_obj.c (ASN1_object_2int, ASN1_int_2object): Support
	SHA3 hash algorithms OID.
	* tool/sigalgo.c (obj_sig2hash): Likewise.

	* hmac/hmactestfc.c (test_hmac_sha3_224, test_hmac_sha3_256)
	(test_hmac_sha3_384, test_hmac_sha3_512): Add HMAC-SHA3 test.
	* hmac/hmactest.c (main): Ditto.
	* hmac/Makefile.am (hmac_test_LDADD, hmac_test_LDFLAGS): Add
	SHA3 library for new tests.

	* hmac/hmac.c (HMAC_SHA3_224, HMAC_SHA3_256, HMAC_SHA3_384)
	(HMAC_SHA3_512): Add new functions.
	* aicrypto/nrg_sha3.h: Make modification accordingly.
	* aicrypto/ok_hmac.h: Ditto.

	* sha3/sha3.c (SHA3_224init, SHA3_256init, SHA3_384init)
	(SHA3_512init): Change the value of delimitedSuffix.

2017-02-13  TAKANDO Takashi  <takando@soum.co.jp>

	* sha3/KeccakCodePackage:
	Import aa3cded0ae844dbff0dbecfb6d42d50c7bdb9d9b from
	KeccakCodePackage Git repository.
	* sha3/Makefile.am: Make modification accordingly.
	* sha3/README.keccak: Ditto.
	* sha3/sha3.c (SHA3init): Ditto.

2017-02-11  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Add the AM_PROG_CC_C_O macro for CentOS 7. This
	macro is obsolescent since Automake 1.14, but no warning is issued.

2017-01-30  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pkcs/p11_key.c (P11RSAprv_doCrypt): Support the CKM_RSA_PKCS
	mechanism.
	* tool/signature.c (P1_sign_digest): Add more comments.

2017-01-20  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rc2/test_rrc2.c: New file.
	* rc2/rc2test.c (main): Add a new test function test_rrc2().
	However it is currently skipped because the result fails.
	* rc2/Makefile.am: Make modification accordingly.

2017-01-19  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/asn1test.c: Add a prototype declaration to silence the
	warning from "-Wimplicit-function-declaration".
	* cmp/cmptest.c: Likewise.
	* cmp/cmptestfc.c: Likewise.
	* cmp/cmptestfc.c (test_cmp_body): Silence the warning from
	"-Wformat-extra-args".
	* ecc/ecctest.c: Add prototype declarations to silence the
	warning from "-Wimplicit-function-declaration".
	* ecc/ecctestfc.c (test_generating_parameter): Silence the warning
	from "-Wparentheses".
	* ecdsa/ecdsatest.c: Add prototype declarations to silence the
	warning from "-Wimplicit-function-declaration".
	* hmac/hmactest.c: Likewise.
	* pem/pemtest.c: Likewise.
	* pem/pemtestfc.c (test_pem_msg): Fix the warning from
	"-Wincompatible-pointer-types".
	* pkcs/pkcstest.c: Add prototype declarations to silence the
	warning from "-Wimplicit-function-declaration".
	* rand/randtest.c: Likewise.
	* rand/randtestfc.c (test_rand): Fix the warning from
	"-Wformat-extra-args".
	* rsa/rsatest.c: Add prototype declarations to silence the
	warning from "-Wimplicit-function-declaration".
	* smime/mimebd_bin.c (MBody_bin_get_body): Silence the warning
	from "-Wparentheses".
	* smime/mimebd_msg.c (MBody_msg_get_body): Likewise.
	* smime/mimebd_multi.c (MBody_multi_get_body): Fix the warning
	from "-Wformat-security".
	* smime/mimebd_smime.c (MBody_smime_get_body): Silence the warning
	from "-Wparantheses".
	* smime/mimebd_text.c (MBody_txt_get_body): Likewise.
	* smime/smimetest.c: Add a prototype declaration to silence the
	warning from "-Wimplicit-function-declaration".
	* spkac/spkactest.c: Likewise.
	* store/storetest.c: Likewise.
	* test/locktest.c (main): Fix the warnings from
	"-Wimplicit-function-declaration" and "-Wformat".
	* test/locktest.c (check_opt): Fix the warning from "-Wreturn-type".
	* x509/x509test.c: Add prototype declarations to silence the
	warning from "-Wimplicit-function-declaration".

2017-01-13  SAKANE Eisaku  <sakane@nii.ac.jp>

	* build-aux: Add new scripts and update conventional ones from
	Automake 1.15.
	* configure.ac: Follow the manner of Automake 1.15.
	* asn1/Makefile.am: Ditto.
	* ssl/Makefile.am: Ditto.
	* test/Makefile.am: Ditto.
	* tls/Makefile.am: Ditto.
	* tool/Makefile.am: Ditto.

2016-11-10  SAKANE Eisaku  <sakane@nii.ac.jp>

	* des/des_key.c (BitChange): Silence the warning from
	"-Wchar-subscripts".

2016-11-02  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 3.1
	* configure.ac: Bump up the minor version number.

2016-09-20  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/extension/ecc.c (write_ec_point_format_list)
	(tls_hs_ecc_read_point_format): Bug fix [#345].
	* tls/handshake/message/shello.c (write_extension): Ditto.

2016-08-25  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_tool.h: Add a new macro M_NO_CHECK_LEN.

2016-08-24  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_asn1.h: Add MD4 support.
	* aicrypto/ok_tool.h: Ditto.
	* tool/hash.c: Ditto.

2016-08-17  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Bump up the CURRENT and AGE respectively.
	* tls/Makefile.am: Ditto.

2016-07-23  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_pem.h: Cope with the warning from -Wunused-function.
	* pem/pem.c: Likewise.

2016-04-28  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/extension/ecc.c (tls_hs_ecc_write_ec_point_formats):
	Fix the case of no point format.
	* tls/tls_cert.c (tls_cert_info_can_use_ecc_cipher_suite): Ditto.

	* tls/handshake/extension/ecc.c: Modify elements of array
	'tls_hs_ecc_supported_named_curves'.

	* tls/test/openssl/sv4.example.org.cer: Add new file.
	* tls/test/openssl/sv4.example.org.key: Ditto.

2016-04-27  TAKANDO Takashi  <takando@soum.co.jp>

	* tool/error.c (get_err_location): Add new location.

	* tls/handshake/message/shello.c (read_extension): Fix debug message.
	* tls/tls_digitally_signed.c (write_digitally_signed_hash_tls12)
	(read_digitally_signed_hash_tls12): Ditto.

	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_get_named_curve): Fix warning.
	* tls/handshake/message/cert.c (check_cert_server): Modify it
	accordingly.
	* tls/tls_cert.c (tls_cert_info_can_use_ecc_cipher_suite)
	(tls_cert_info_available): Ditto.
	* tls/tls_cipher.c (cipher_suite_decided, tls_cipher_select)
	(tls_cipher_keymethod): Ditto.

	* aicrypto/ok_err.h: Add points and TLS error state.
	* tool/error.c (get_err_type): Modify it accordingly.
	* tls/handshake/ecdh/ecdhkey.c (get_ECParam_type): Fix warning.
	(tls_hs_ecdhkey_gen_for_server, tls_hs_ecdhkey_set_peer_pubkey):
	Modify it accordingly.
	* tls/handshake/ecdh/ecdhkey.c: Modify OK_set_error().

	* tls/handshake/extension/ecc.c: Modify elements of array
	'tls_hs_ecc_supported_named_curves'.
	* tls/handshake/message/cert.c (check_cert_server): Bug fix.

	* tls/handshake/message/cert.c (check_cert_server): Fix SEGV.

	* tls/handshake/message/certvfy.c (tls_hs_certvfy_parse): Modify
	error point.

2016-04-20  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/Makefile.am: Add nrg_md4.h.

2016-04-20  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/extension/sighash.c (tls_hs_sighash_free):
	Add NULL check of argument.

	* tls/test/test-common.sh: Add a new constant PATH_P12_SERVER3.
	* tls/test/test-1-4.sh: Add new file.
	* tls/Makefile.am: Modify it accordingly.

	* tls/tls_cipher.c (tls_cipher_select): Fix the loop control.

2016-04-19  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/test/p12/sv3.example.org.p12: Add new file.

2016-04-19  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aiconfig.h.in: Removed because this is automatically generated
	with autoreconf(1).

2016-04-18  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/extension/ecc.c: Modify elements of array
	'tls_hs_ecc_supported_named_curves'.

	* aicrypto/ok_err.h: Add points and TLS error state.
	* tool/error.c (get_err_location, get_err_type): Modify it accordingly.
	* tls/handshake/message/cert.c (set_privkey_from_pkcs12)
	(set_pubkey_from_pkcs12): Add or modify of error handling.
	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_skeyexc_read_server_params)
	(calc_shared_secret, tls_hs_ecdh_ckeyexc_read_exchange_keys): Ditto.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_gen_for_server)
	(tls_hs_ecdhkey_set_to_ecpoint, tls_hs_ecdhkey_set_peer_pubkey)
	(tls_hs_ecdhkey_set_my_privkey_from_pkcs12)
	(tls_hs_ecdhkey_set_peer_pubkey_from_pkcs12): Ditto.

	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_gen_for_client):
	Remove the redundant processing.

2016-04-15  TAKANDO Takashi  <takando@soum.co.jp>

	* aicrypto/ok_err.h: Add points and TLS error state.
	* tls/handshake/message/shello.c (read_extension): To organize
	arguments of OK_set_error().
	* tls/handshake/message/skeyexc.c (tls_hs_skeyexc_parse): Ditto.
	* tls/tls_cert.c (tls_cert_info_get, tls_cert_info_available): Ditto.
	* tls/tls_cipher.c (tls_cipher_select, tls_cipher_keymethod): Ditto.

	* tls/cipher/aead.c (tls_decipher_aead): Fix error numbering.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_read): Ditto.

	* tls/include/tls_handshake.h: Add new member to struct tls_hs_ecdh.
	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_skeyexc_write_server_params)
	(tls_hs_ecdh_ckeyexc_write_exchange_keys, tls_hs_ecdh_free):
	Add the release processing of ephemeral key.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_set_peer_pubkey)
	(tls_hs_ecdhkey_set_my_privkey_from_pkcs12)
	(tls_hs_ecdhkey_set_peer_pubkey_from_pkcs12): Ditto
	(tls_hs_ecdhkey_gen_for_client): Fix a memory release leak.

2016-04-14  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_cert.c (tls_cert_info_available): Modify return value,
	debug message, etc.

	* tls/tls_cert.c (tls_cert_info_can_use_ecc_cipher_suite):
	New arg PFLIST.
	* tls/include/tls_cert.h: Modify it accordingly.
	* tls/handshake/message/cert.c (check_cert_server): Ditto.
	* tls/tls_cipher.c (tls_cipher_select): Ditto.

	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_set_curve)
	(tls_hs_ecdh_set_curve_by_cert): New function.
	* tls/include/tls_handshake.h: Modify it accordingly.
	* tls/tls_cipher.c (cipher_suite_decided): New function.
	(tls_cipher_select): Rewrite by using the new function.

	* tls/tls_cert.c (tls_cert_info_ecc_get_type)
	(tls_cert_info_ecc_get_curve): New function.
	* tls/include/tls_cert.h: Modify it accordingly.

	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_get_point_format)
	(tls_hs_ecdh_get_curve_type): New function.
	* tls/include/tls_handshake.h: Modify it accordingly.

	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_get_named_curve):
	Move to ...
	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_get_named_curve): ... here.
	* tls/include/tls_handshake.h: Modify it accordingly.
	* tls/include/tls_cert.h: Change the type of curve_type (member of
	struct tls_cert_info).
	* tls/tls_cert.c (get_pubkey_ecc_info): Change function type.
	(tls_cert_info_get): Modify it accordingly.

	* tls/handshake/extension/ecc.c (tls_hs_ecc_get_supported_pflist):
	New function.
	* tls/include/extension/tls_ecc.h: Modify it accordingly.

2016-04-13  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_cert.c (tls_cert_info_init): New function.
	(tls_cert_info_get): Modify it accordingly.
	* tls/include/tls_cert.h: Modify it accordingly.

	* tls/handshake/message/cert.c (check_cert_server): Rewrite by using
	the tls_cert_info_xxx function.
	(write_certchain): Modify it accordingly.

	* tls/handshake/ecdh/ecdhkey.c (ecdhkey_generate): Change the
	calling function to a more suitable.

	* tls/handshake/client-server/server.c (read_client_hello):
	Change alert description.
	* tls/tls_cipher.c (tls_cipher_select): Ditto.

2016-04-12  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_cert.c (tls_cert_info_can_use_ecc_cipher_suite): Change
	the type of the 2nd argument.
	* tls/include/tls_cert.h: Modify it accordingly.
	* tls/tls_cipher.c (tls_cipher_select): Ditto.

	* tls/handshake/extension/ecc.c (tls_hs_ecc_get_supported_eclist):
	New function.
	* tls/include/extension/tls_ecc.h: Modify it accordingly.

	* tls/tls_cert.c (tls_cert_info_check): Rename to...
	(tls_cert_info_available): ... this. And add new arg SET_ERROR.
	* tls/tls_cipher.c (tls_cipher_select): Modify it accordingly.
	* tls/include/tls_cert.h: Modify it accordingly.
	* aicrypto/ok_err.h: Add ERR_ST_TLS_NOT_ECDH_PUB.

	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_get_named_curve):
	New function.
	* tls/include/tls_handshake.h: Modify it accordingly.
	* tls/handshake/message/cert.c (get_pubkey_ecc_info): Fix a bug
	of curve type convert.

	* tls/handshake/extension/ecc.c (save_eclist, save_pflist): Delete
	process that is not appropriate.

	* tls/tls_cipher.c (tls_cipher_keyexc_method_dump): New function.
	* tls/include/tls_cipher.h: Add new macro 'TLS_KXC_METHOD_DUMP'.

2016-04-12  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rc2/test_rfc2268.c: New file.
	* rc2/rc2test.c (main): Add a new test function test_rfc2268().
	* rc2/Makefile.am: Make modification accordingly.
	* md2/md2testfc.c (test_md2): Slightly change the indication of
	the result of a test.
	* md5/md5testfc.c (test_md5): Likewise.

2016-04-09  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/chello.c (read_cipher_suite): Move the
	function tls_cipher_select() call from here to ...
	* tls/handshake/client-server/server.c (read_client_hello):
	here.
	* tls/include/tls.h: Add new member chello_cipher_suites to strcut tls.
	* tls/tls_cipher.c (tls_cipher_select): Modify to execute a check of
	the certificate.

	* tls/tls_cipher.c (tls_cipher_list): Rename to...
	(tls_cipher_supported_list): ... this. And add new arg PREFERENCE.
	* tls/handshake/message/chello.c (write_cipher_suite):
	Modify it accordingly.
	* tls/include/tls_cipher.h: Ditto.

	* tls/tls_cert.c (get_pubkey_ecc_info, tls_cert_info_get)
	(tls_cert_info_can_use_ecc_cipher_suite, tls_cert_info_check):
	New function.
	* tls/include/tls_cert.h: Add struct tls_cert_info, enum ext_ku.
	* tls/handshake/message/cert.c (check_cert_servre, check_cert_client):
	Modify it accordingly.

	* tls/tls_cipher.c (tls_keyexchange_method): Modify storage class.
	* tls/include/tls_cipher.h: Modify it accordingly.

2016-04-06  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/chello.c (read_cipher_suite): Move the
	cipher suite selection process to be executed when the session
	resumed to ...
	* tls/tls_cipher.c (tls_cipher_select): ... here.

	* tls/tls_cipher.c (tls_cipher_select): Modify argument type.
	(tls_cipher_list_alloc): New function.
	(tls_cipher_list): Rewrite by using the new function.
	* tls/handshake/message/chello.c (read_cipher_suite): Ditto.
	* tls/include/tls_cipher.h: Modify it accordingly.

2016-04-05  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/chello.c (read_cipher_suite): Fix a bug
	in the cipher suites reading.

2016-04-05  URA Hiroshi  <ura@soum.co.jp>

	* tls/include/tls.h: Add TLS_KXC_NULL that is used as initial value
	and to handle error.
	* tls/tls_cipher.c (tls_cipher_keymethod): New function that splits
	from tls_cipher_set_tls12.
	* tls/tls_cipher.c (tls_cipher_set_tls12): Rewrite by using
	tls_cipher_keymethod.

2016-03-31  URA Hiroshi  <ura@soum.co.jp>

	* tls/include/tls.h: Add the rest of cipher suites defined by
	RFC4492, RFC5288, and RFC5289.

2016-03-31  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_cipher.c (tls_cipher_suite_dump, tls_cipher_param_set):
	Add new cipher suites.
	* tls/handshake/message/cert.c (write_certchain, read_certchain):
	Modify it accordingly.
	(set_privkey_from_pkcs12, set_pubkey_from_pkcs12): New functions.
	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_set_privkey_from_pkcs12)
	(tls_hs_ecdh_set_pubkey_from_pkcs12): New functions.
	* tls/handshake/ecdh/ecdhkey.c
	(tls_hs_ecdhkey_set_my_privkey_from_pkcs12)
	(tls_hs_ecdhkey_set_peer_pubkey_from_pkcs12): New functions.
	* tls/include/tls_handshake.h: Modify it accordingly.
	* tls/include/tls_handshake_ecdh.h: Ditto.

	* tls/include/tls.h: Unified 'enum tls_keyexchange_method' and
	'enum tls_keyexchange_algorithm'.
	* tls/handshake/message/cert.c (check_cert_server): Modify it
	accordingly.
	* tls/handshake/message/ckeyexc.c (write_exchange_keys)
	(read_exchange_keys): Ditto.
	* tls/handshake/message/skeyexc.c (write_params, write_signed_params)
	(read_params, read_signed_params, tls_hs_skeyexc_compose): Ditto.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_save_default):
	Ditto.
	* tls/tls_cipher.c (tls_cipher_set_tls12): Ditto.

2016-03-29  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/chello.c (write_ext): Modify local variables.
	* tls/handshake/message/shello.c (write_extension): Ditto.

	* tls/handshake/message/cert.c (get_pkcs12): Return to original.
	(write_certchain, read_certchain, tls_hs_scert_compose)
	(tls_hs_scert_parse, tls_hs_ccert_compose, tls_hs_ccert_parse):
	Modify it accordingly.
	* tls/include/tls_handshake.h: Remove type 'enum tls_hs_pkcs12_t'.
	* tls/handshake/util/pkcs12.c: Removed.
	* tls/Makefile.am: Modify it accordingly.
	* tls/Makefile.in: Automatically regenerated.

	* tls/tls_digitally_signed.c (tls_digitally_signed_write_hash)
	(write_digitally_signed_hash_tls12, tls_digitally_signed_read_hash)
	(read_digitally_signed_hash_tls12): Modify argument type
	from enum tls_hs_pkcs12_t to PKSC12 *.
	* tls/include/tls_digitally_signed.h: Modify it accordingly.
	* tls/handshake/message/certvfy.c (tls_hs_certvfy_compose)
	(tls_hs_certvfy_parse): Ditto.
	* tls/handshake/message/skeyexc.c (write_signed_params)
	(read_signed_params): Ditto.

	* tls/tls_cipher.c (tls_cipher_suite_dump, tls_cipher_param_set):
	Add new cipher suites.

2016-03-28  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/ecdh/ecdh.c (calc_shared_secret): New function.
	(tls_hs_ecdh_ckeyexc_write_exchange_keys): Modify it accordingly.
	(tls_hs_ecdh_ckeyexc_read_exchange_keys): Ditto.

	* tls/tls_cipher.c (tls_cipher_suite_dump, tls_cipher_param_set):
	Add new cipher suites.

	* tls/handshake/extension/ecc.c (write_elliptic_curve_list): Bug fix.

	* tls/handshake/ecdh/ecdh.c (tls_hs_pfs_write_server_ecdh_params):
	Rename to...
	(tls_hs_ecdh_skeyexc_write_server_params): ... this.
	* tls/handshake/message/skeyexc.c (write_params): Modify it accordingly.
	* tls/include/tls_handshake.h: Ditto.

	* tls/handshake/ecdh/ecdh.c (tls_hs_pfs_read_server_ecdh_params):
	Rename to...
	(tls_hs_ecdh_skeyexc_read_server_params): ... this.
	* tls/handshake/message/skeyexc.c (read_params): Modify it accordingly.
	* tls/include/tls_handshake.h: Ditto.

2016-03-27  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_generate)
	(tls_hs_ecdhkey_read, tls_hs_ecdhkey_write): Rename to ...
	(ecdhkey_generate, tls_hs_ecdhkey_set_to_ecpoint)
	(tls_hs_ecdhkey_set_peer_pubkey): ... these.
	(tls_hs_ecdhkey_gen_for_server): New function.
	* tls/handshake/ecdh/ecdh.c (tls_hs_pfs_write_server_ecdh_params)
	(tls_hs_pfs_read_server_ecdh_params, write_public, read_public):
	Modify it accordingly.
	* tls/include/tls_handshake.h: Ditto.
	* tls/include/tls_handshake_ecdh.h: New file.
	* tls/Makefile.am: Modify it accordingly.
	* tls/Makefile.in: Automatically regenerated.

	* tls/handshake/ecdh/ecdh.c (tls_hs_ecdh_ckeyexc_write_exchange_keys)
	(tls_hs_ecdh_ckeyexc_read_exchange_keys): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_gen_for_client): Ditto.
	* tls/handshake/message/ckeyexc.c (write_exchange_keys)
	(read_exchange_keys): Modify it accordingly.
	* tls/include/tls_handshake.h: Ditto.
	* tls/include/tls_handshake_ecdh.h: New file.

2016-03-24  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/include/tls_handshake.h: Rename the member of tls_hs_ecdh.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_generate)
	(tls_hs_ecdhkey_write, tls_hs_ecdhkey_read): Modify it accordingly.

2016-03-21  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pem/test_rfc4648.c: New file.
	* pem/Makefile.am: Make modification accordingly.

2016-03-18  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/cert.c (check_cert_server): Add keymethod.
	* tls/handshake/client-server/server.c (check_auth_by_cert): Ditto.

	* tls/handshake/extension/ecc.c (write_ec_point_format_list)
	(tls_hs_ecc_read_point_format): Bug fix.
	* tls/tls.c (init_handshake): Ditto.

2016-03-17  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/skeyexc.c (write_signed_params): Implemented.
	* tls/tls_digitally_signed.c (write_digitally_signed_hash_tls12):
	Modified for ServerKeyExchange.
	* tls/handshake/extension/sighash.c (tls_hs_sighash_save_default):
	Likewise.
	* tls/handshake/util/signature.c: New file.
	* tls/include/tls_handshake.h: Modify it accordingly.
	* tls/Makefile.am: Modify it accordingly.
	* tls/Makefile.in: Automatically regenerated.

	* tls/handshake/message/skeyexc.c (tls_hs_skeyexc_parse): Implemented.
	(read_params, read_signed_params): New function.
	* tls/handshake/ecdh/ecdh.c (read_curve_params, read_public)
	(tls_hs_pfs_read_server_ecdh_params): New function.
	* tls/handshake/ecdh/ecdhkey.c (tls_hs_ecdhkey_read): Ditto.
	* tls/include/tls_handshake.h: Modify it accordingly.
	* tls/tls_digitally_signed.c (read_digitally_signed_hash_tls12):
	Modified for ServerKeyExchange.

2016-03-16  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_digitally_signed.c (read_digitally_signed_hash_tls12):
	Fixed the wrong check of the return value.

	* tls/include/tls.h: Add TLS_KXC_ECDH_anon, and modified the
	order of entries according to RFC.

	* tls/include/tls.h: Add new member kxcalgo to struct tls.
	* tls/tls_cipher.c (tls_cipher_set_tls12): Add new case.

	* tls/handshake/message/skeyexc.c (tls_hs_skeyexc_need_to_send):
	New function.
	* tls/include/tls_handshake.h: Ditto.
	* tls/handshake/client-server/server.c (write_server_key_exchange):
	Modify it accordingly.

	* tls/include/tls_handshake.h: New type 'struct tls_hs_ecdh' by
	deviding 'struct tls_hs_pfs'.
	* tls/include/tls.h: Modify it accordingly.
	* tls/tls.c (init_handshake): Likewise.
	* tls/handshake/extension/ecc.c (write_ec_point_format_list)
	(save_eclist, save_pflist): Likewise.
	* tls/handshake/ecdh/ecdh.c: New file.
	* tls/handshake/ecdh/pfs.c: Removed.
	* tls/Makefile.am: Modify it accordingly.
	* tls/Makefile.in: Automatically regenerated.

	* tls/handshake/ecdh/ecdhkey.c: New file.
	* tls/include/tls_handshake.h: Modify it accordingly.
	* tls/Makefile.am: Modify it accordingly.
	* tls/Makefile.in: Automatically regenerated.

	* tls/handshake/ecdh/ecdh.c (write_curve_params, write_public)
	(tls_hs_pfs_write_server_ecdh_params): New function.
	* tls/include/extension/tls_ecc.h: Add enum tls_hs_ecc_ec_point_format.
	* tls/include/tls_handshake.h: Add member to struct tls_hs_ecdh.
	* tls/tls_cipher.c (tls_cipher_set_tls12): Set provisionally parameter.

	* tls/handshake/message/skeyexc.c (tls_hs_skeyexc_compose):
	Implemented.
	* tls/handshake/message/skeyexc.c (write_params, write_signed_params):
	New functions.

2016-03-13  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/include/tls_handshake.h: Modify enum tls_hello_extension.
	* tls/include/extension/tls_ecc.h: Modify enum tls_hs_ecc_named_curve.

	* tls/include/tls.h: Add enum tls_keyexchange_algorithm
2016-03-11  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/cert.c (get_pkcs12): Move this function
	and 'enum tls_cert_t' to the following files.
	* tls/include/tls_handshake.h: Add new type 'enum tls_hs_pkcs12_t'.
	* tls/handshake/util/pkcs12.c: New file.
	* tls/include/tls_digitally_signed.h: Modify it accordingly.
	* tls/tls_digitally_signed.c: Ditto.
	* tls/handshake/message/certvfy.c: Ditto.
	* tls/Makefile.am: Modify it accordingly.
	* tls/Makefile.in: Automatically regenerated.

	* aicrypto/ok_err.h: Add new points for tls_digitally_signed.c.
	* tls/tls_digitally_signed.c (write_digitally_signed_hash_tls12)
	(read_digitally_signed_hash_tls12): Modify it accordingly.
	* tls/handshake/message/certvfy.c (tls_hs_certvfy_parse): Likewise.

	* tls/include/tls_handshake.h: Add new type 'struct tls_hs_pfs'.
	* tls/handshake/extension/ecc.c: Remove type 'struct tls_hs_ecc'.
	* tls/include/tls.h: Rename member of struct tls 'ecc' to 'pfs'.
	All reference changed.
	* tls/tls.c (init_handshake): Modify it accordingly.
	* tls/handshake/client-server/client.c (do_phase_hello, cleanup):
	Likewise.
	* tls/handshake/client-server/server.c (do_phase_hello, cleanup):
	Likewise.
	* tls/handshake/ecdh/pfs.c: New file.
	* tls/Makefile.am: Modify it accordingly.
	* tls/Makefile.in: Automatically regenerated.

2016-03-10  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/include/extension/tls_ecc.h: Add new struct tls_hs_ecc.
	* tls/include/tls.h: Modify it accordingly.
	* tls/handshake/extension/ecc.c: Ditto.

2016-03-09  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/handshake/message/certvfy.c (write_digitally_signed_hash)
	(write_digitally_signed_hash_tls12, read_digitally_signed_hash)
	(read_digitally_signed_hash_tls12): Move to other file, and rename.
	All callers changed.
	* tls/tls_digitally_signed.c: New file.
	* tls/include/tls_digitally_signed.h: Ditto.
	* tls/Makefile.am: Modify it accordingly.
	* tls/Makefile.in: Automatically regenerated.

2016-03-07  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rc4/test_rfc6229.c: New file.
	* rc4/test_st.h: Ditto.
	* rc4/rc4test.c (main): Add a new test test_rfc6229().
	* rc4/Makefile.am: Make modification accordingly.

2016-03-03  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/include/tls_handshake.h: Add new type of Client/Server Hello
	Extensions.
	* tls/handshake/message/chello.c (check_ext_availability, write_ext)
	(read_ext_list): Likewise.
	* tls/handshake/message/shello.c (check_ext_availability)
	(write_extension, read_extension, read_ext_list): Ditto.
	* tls/include/tls.h: Add new member for the new extension.
	* aicrypto/ok_err.h: Add new points for the new extension.
	* tls/include/extension/tls_ecc.h: New file.
	* tls/handshake/extension/ecc.c: Ditto.
	* tls/Makefile.am: Modify it accordingly.
	* tls/Makefile.in: Automatically regenerated.

2016-03-02  TAKANDO Takashi  <takando@soum.co.jp>

	* configure: Automatically regenerated.

2016-02-29  TAKANDO Takashi  <takando@soum.co.jp>

	* aicrypto/Makefile.am: Add nrg_modes.h.
	* aicrypto/Makefile.in: Automatically regenerated.
	* Makefile.in: Ditto.
	* aes/Makefile.in: Ditto.
	* modes/Makefile.in: Ditto.

2016-02-28  TAKANDO Takashi  <takando@soum.co.jp>

	* modes/Makefile.am: Add bs128_test_CPPFLAGS

2016-02-26  TAKANDO Takashi  <takando@soum.co.jp>

	* modes/gcm.c (inccb_gctr): Rename from step3.
	All callers changed.
	* modes/gcmtestfc.c: Likewise.

	* modes/gcm.c (gcm_decrypt): Rename the local variable 'len' to 'clen'.

	* modes/gcm.c (gcm_encrypt, gcm_decrypt): Implement the error handling.
	(new_hash_subkey128): Modify it accordingly.
	* aicrypto/nrg_modes.h: Ditto.
	* aicrypto/ok_err.h: Ditto.
	* aes/aes_mode.c (AES_gcm_encrypt, AES_gcm_decrypt): Ditto.
	* aicrypto/ok_aes.h: Ditto.
	* tls/cipher/aead.c (tls_cipher_aead, tls_decipher_aead): Ditto.
	* tls/tls_mac.c (tls_aad_generate): Likewise.

2016-02-25  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/include/tls.h: Add TLS_PRF_SHA384 to enum prf_algorithm.
	* tls/tls_prf.c (tls_prf_sha384, p_hash_sha384): New function.
	* tls/tls_key.c (tls_key_make_master_secret, tls_key_make_key_block):
	Modify it accordingly.
	* tls/include/tls_prf.h: Add prototype declaration.
	* tls/handshake/message/finished.c (do_prf_sha384): New function.
	(write_verify_data, read_verify_data): Modify it accordingly.
	* tls/tls_cipher.c (tls_cipher_suite_dump, tls_cipher_set_tls12)
	(tls_cipher_param_set): Add AEAD cipher parameter.

	* modes/gcm.c (gcm_param_set_key): New function.
	* modes/gcmtestfc.c (TEST_AES_VEC, TEST_AES_VEC_A): Modify it
	accordingly.
	* aes/aesgcmtestfc.c (TEST_C): Ditto.
	* tls/cipher/aead.c (tls_cipher_aead, tls_decipher_aead): Ditto.
	* aicrypto/nrg_modes.h: Add prototype declaration.

2016-02-24  SAKANE Eisaku  <sakane@nii.ac.jp>

	* des/des.c (DES2Crypto, DES2Plain): Remove the macro __WINDOWS__.
	* des/des_key.c: Likewise.
	* des/des_mode.c (DES_cfb_encrypt_ll, DES_cfb_decrypt_ll): Likewise.
	* des/destestfc.c (test_des): Likewise.
	* rand/lutzseed.c (seed_internal, seed_stat): Likewise.
	* rand/lutzseed.c (seed_env): Likewise (removed).
	* rand/rand.c (RAND_init): Likewise.
	* tool/lock.c (OK_init_lock, OK_release_lock, OK_lock, OK_unlock):
	Likewise.
	* tool/io.c (strdup_debug): Likewise (removed).
	* pem/pem_cry.c (PEM_msg_decrypt, PEM_msg_encrypt): Likewise.
	* pkcs/p12_asn1.c (P12_DER_authsafe): Likewise.
	* pkcs/p12_file.c (P12_read_file): Likewise.
	* pkcs/pkcs11.c (P11_init, P11_free): Likewise.
	* pkcs/pkcs8.c (ASN1_p8_decrypted, P8_encrypted_toDER_in): Likewise.
	* pkcs/pkcstestfc.c: Likewise.
	* smime/smimetestfc.c: Likewise.
	* store/storetestfc.c (test_manager_new): Likewise.
	* x509/x509_time.c (timegm): Likewise.
	* aicrypto/ok_rand.h: Likewise.
	* aicrypto/ok_store.h: Likewise.

2016-02-24  TAKANDO Takashi  <takando@soum.co.jp>

	* aes/aesgcmtest.c: New file.
	* aes/aesgcmtestfc.c: Ditto.
	* aes/Makefile.am: Modify it accordingly.
	* modes/aesgcm_testvec.h: Ditto.

	* tls/test/client.c (do_www, run_client, main): Add --www option.

	* tls/tls_cipher.c: Change order of 'tls_cipher_list_tls12'.

2016-02-23  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_key.c (make_aicrypto_key): Recover the hidden code.

2016-02-22  TAKANDO Takashi  <takando@soum.co.jp>

	* modes/gcm.c (gctr): Clean up.

	* modes/aesgcm_testvec.h: New file.
	* modes/gcmtest.c: Ditto.
	* modes/gcmtestfc.c: Ditto.
	* modes/Makefile.am: Make modification accordingly.

	* tls/cipher/aead.c (tls_cipher_aead, tls_decipher_aead):
	New arg TYPE, and process implementation.
	* tls/include/tls_cipher.h: Modify it accordingly.
	* tls/tls_cipher.c (tls_cipher, tls_decipher): Callers changed.

2016-02-22  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rc2/README: Rename rrc2.doc.
	* des/destest.c: Silence the warning from
	"-Wimplicit-function-declaration".
	* asn1/asn1_cert.c: Remove the macro __WINDOWS__.
	* asn1/asn1_file.c (ASN1_read_der, ASN1_write_der): Likewise.
	* asn1/asn1_print.c (ASN1_print_tag): Likewise.
	* cmp/cmptest.c: Likewise.
	* lnm/large_divmod.c (LN_div_mod): Likewise.
	* lnm/large_shift.c (LN_rshift32, LN_lshift32): Likewise.
	* lnm/testfunc.c (test_karatsuba): Likewise.

2016-02-21  SAKANE Eisaku  <sakane@nii.ac.jp>

	* md4/test_rfc1320.c (test_md4): Slightly change the indication of
	the result of a test.

2016-02-19  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_key.c (make_mac_key): Support for no MAC key.
	(make_key_block): Comment fixes.

	* modes/bs128.c: New file.
	* modes/bs128.h: Ditto.
	* modes/bs128test.c: Ditto.
	* modes/bs128testfc.c: Ditto.
	* aicrypto/nrg_modes.h: Ditto.
	* modes/gcm.c: Ditto.
	* modes/Makefile.am: Ditto.
	* Makefile.am: Make tiny modification accordingly.
	* configure.ac: Likewise.

	* aes/aes.c (AES_encrypt_128): New function.
	* aes/aes_mode.c (AES_gcm_encrypt, AES_gcm_decrypt): Ditto.
	* aicrypto/ok_aes.h: Add prototype declaration.

2016-02-18  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls_mac.c (tls_aad_generate): New function.
	(init_text): Modify for new function.
	* tls/include/tls_mac.h: Add prototype declaration.

2016-02-18  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure: Removed. For developers, please execute autoreconf(1)
	before compiling.
	* aclocal.m4: Ditto.
	* Makefile.in: Ditto. Other Makefile.in in sub-directory is the same.

2016-02-18  SAKANE Eisaku  <sakane@nii.ac.jp>

	* md4: New module for instructive utilization.
	* aicrypto/nrg_md4.h: New file.
	* configure.ac: Add a new option `--enable-md4'.
	* Makefile.am: Add MD4 support.

2016-02-14  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 3.0
	* configure.ac: Bump up the major version number.

2016-02-12  TAKANDO Takashi  <takando@soum.co.jp>

	* tls/tls.h: Add new cipher suites.
	* tls/tls_cipher.c (tls_cipher_suite_dump, tls_cipher_set_tls12)
	(tls_cipher_param_set): Add AEAD cipher parameter.

2016-02-08  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_x509.h: Fixed typo.

2016-02-05  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Removed the following from the help message of
	DEFAULT_SIG_TYPE: MD2RSA, MD5RSA, SHA1RSA, SHA1DSA, SHA1ECDSA.

2016-02-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* x509/cert_asn1.c (x509_DER_algoid): There are still meaningless
	sentences.
	* store/sto_file.c (cs_DER_bag): Likewise.
	* ssl/ssl_tool.c (ssl_check_sslctx): Add the prototype declaration
	so as to silence the warning from -Wimplicit-function-declaration.

2015-10-13  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/site_defaults.h.in: New file.
	* aicrypto/Makefile.am: Add "site_defaults_h.in" and
	"site_defaults.h" to EXTRA_DIST and pkginclude_HEADERS respectively.
	* aicrypto/ok_x509.h: Include "site_defaults.h".
	* configure.ac: Add "site_defaults.h" to AC_CONFIG_FILES.

2015-07-29  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Bump up the CURRENT of libaicrypto and set REVISION and
	AGE to 0.
	* smime/Makefile.am: Likewise.
	* ssl/Makefile.am: Likewise.
	* tls/Makefile.am: Explicitly set REVISION and AGE to 0.

2015-07-02  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tool/error.c (OK_set_error): Change the type of the 4th argument
	from 'int *' to 'CK_RV *' defined by pkcs11t.h.
	* tool/error.c (OK_get_errorinfo): Change the type of the return
	value from 'int *' to 'CK_RV *'.
	* aicrypto/ok_err.h: Modify the prototype declarations accordingly.
	* pkcs/p11_key.c (P11_rsa_generate_, P11RSAprv_doCrypt)
	(P11RSApub_doCrypt, p11_open_key_, P11_gen_symkey)
	(P11_unwrap_rsakey): Make modification accordingly.
	* pkcs/p11_sess.c (P11_open_session, P11_login, P11_mofn_activate)
	(P11_get_cert, P11_get_rsapub, P11_put_cert, P11_put_rsakey): Ditto.
	* pkcs/p12_tool.c (P12_get_usercert, P12_get_privatekey): Set NULL
	to the 4th argument of OK_set_error().
	* pkcs/pkcs11.c (P11_init, P11_get_libinfo, P11_get_slotlist)
	(P11_get_slotinfo, P11_get_tokeninfo): Likewise.

2015-07-01  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pkcs/p11_key.c (P11RSAprv_doCrypt): Extend the upper limit of
	RSA-key length.

2015-05-26  SAKANE Eisaku  <sakane@nii.ac.jp>

	* smime/smime_enc.c: Initialize a static variable "digest_algo".

2015-05-18  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_pkcs7.h: Remove the declaration of the global variable
	default_p7s_digest_algo.
	* tool/defalgo.c (OK_get_p7s_digest_algo, OK_set_p7s_digest_algo):
	Rename the local variable default_p7s_digest_algo to p7s_digest_algo.
	* smime/smime_enc.c (SMIME_p7s_set_signature)
	(SMIME_p7s_set_msg_sign): Use the function
	OK_get_p7s_digest_algo() instead of the variable
	default_p7s_digest_algo.
	* pkcs/pkcstestfc.c (test_pkcs_p7): Likewise.
	* smime/Makefile.am: New library libaismime separated from libaicrypto.
	* Makefile.am: Make modification accordingly.
	* test/Makefile.am: Likewise.

2015-05-14  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Improve tests for libraries.

2015-04-13  SAKANE Eisaku  <sakane@nii.ac.jp>

	* version.c (acirypto_version): Make tiny modification.

2015-04-10  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_wincry.h: No longer installed to $includedir.

2015-04-07  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aes/test_fips197.c: New file.
	* aes/test_rfc3602.c: Ditto. [#292]
	* aes/aestest.c: Deprecate the function test_aes().
	* aes/Makefile.am: Make modification accordingly.

2015-04-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_tool.h: Add new mode M_DECRYPT for OK_get_password_p12().
	* pkcs/p12_mac.c (P12_verify_mac): Set M_DECRYPT to the third
	argument of OK_get_password_p12().
	* tool/pass.c (OK_get_passwd): Not impose the minimal length
	condition of input password when M_DECRYPT is set.

2015-04-01  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_sha2.h: Change the type (SHA512_MSGSIZE_T) of 'len'
	of SHA512_CTX to uint64_t [2].
	* aicrypto/ok_sha2.h (OK_SHA384, SHA384update, OK_SHA512)
	(SHA512update, OK_SHA512224, SHA512224update, OK_SHA512256)
	(SHA512256update): Change the type of message length to 'unsigned
	int' because of the same reason as aicrypto/ok_sha1.h.
	* sha2/sha512.c (OK_SHA384, SHA384update, OK_SHA512, SHA512update)
	(OK_SHA512224, SHA512224update, OK_SHA512256, SHA512256update)
	(_SHA512init, _SHA512update, set_length): Make modification
	accordingly.
	* tool/test_digest.c

2015-03-31  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_sha1.h: Change the type (uint64_t) of 'len' of
	SHA1_CTX to uint32_t [2].
	* aicrypto/ok_sha1.h (OK_SHA1, SHA1update): Change the type of
	message length to 'unsigned int' because the size of "input
	buffer" (not the whole message) will be less than 512MB.
	* sha1/sha1.c (OK_SHA1, SHA1init, SHA1update, set_length): Make
	modification accordingly.
	* sha1/sha1test.c: Add the prototype declaration of the function
	test_sha1().
	* sha1/sha1testfc.c: Clean up.
	* aicrypto/ok_sha2.h: Modify SHA256_CTX the same as
	aicrypto/ok_sha1.h.
	* aicrypto/ok_sha2.h (OK_SHA224, SHA224update, OK_SHA256)
	(SHA256update): Make the same changes as aicrypto/ok_sha1.h.
	* sha2/sha256.c (OK_SHA224, SHA224update, OK_SHA256, SHA256update)
	(_SHA256init, _SHA256update, set_length): Make modification
	accordingly.
	* sha2/sha2test.c: Add the prototype declarations of the functions
	called in main().

2015-03-27  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/large_num.h (LN_div, LN_div_mod, LN_long_div)
	(LN_long_mod): Change parameter name to silence the warning:
	declaration of 'div' shadows a global declaration, etc.
	* aicrypto/ok_ssl.h (SSL_set_fd): Likewise.
	* aicrypto/ok_store.h (CStore_add_bag, CS_cert2bag, CS_crl2bag)
	(CS_req2bag, CS_key2bag, CS_der2bag, CS_encder2bag): Likewise.
	* aicrypto/ok_x509.h (Cert_DER_time): Likewise.
	* tls/handshake/message/finished.c (get_label): Likewise.

2015-03-26  HAMANO Kiyoto  <kiyoto@soum.co.jp>

	* tls/tls_record.c (read_fragments_handshake): Add comment line
	for future renegotiation implementation.
	* tls/tls_handshake.c (tls_handshake_read): Ignore hello request
	if client receive that data in the invalid status (middle of
	handshake).
	* tls/tls_handshake.c (start_handshake): Do not change state to
	TLS_STATE_HS_INIT if current stat is TLS_STATE_HS_REINIT.
	* tls/include/tls.h: add definition of TLS_STATE_HS_REINIT to the
	enum tls_state.
	* tls/handshake/client-server/client.c (read_hello_request): do
	the read of hello request in the case that tls state is
	TLS_STATE_HS_REINIT.

	* tls/tls.c: Add comments.
	* tls/tls_alert.c: Ditto.
	* tls/tls_ccs.c: Ditto.
	* tls/tls_cert.c: Ditto.
	* tls/tls_cipher.c: Ditto.
	* tls/tls_compat.c: Ditto.
	* tls/tls_handshake.c: Ditto.
	* tls/tls_key.c: Ditto.
	* tls/tls_mac.c: Ditto.
	* tls/tls_opt.c: Ditto.
	* tls/tls_prf.c: Ditto.
	* tls/tls_record.c: Ditto.
	* tls/tls_stm.c: Ditto.
	* tls/tls_util.c: Ditto.
	* tls/cipher/block.c: Ditto.
	* tls/cipher/stream.c: Ditto.
	* tls/handshake/util/hash.c: Ditto.
	* tls/handshake/util/message.c: Ditto.
	* tls/handshake/extension/sighash.c: Ditto.
	* tls/handshake/client-server/client.c: Ditto.
	* tls/handshake/client-server/server.c: Ditto.
	* tls/handshake/client-server/finale.c: Ditto.
	* tls/handshake/message/cert.c: Ditto.
	* tls/handshake/message/certreq.c: Ditto.
	* tls/handshake/message/certvfy.c: Ditto.
	* tls/handshake/message/chello.c: Ditto.

	* tls/handshake/client-server/server.c: fix memory leak.

2015-03-24  HAMANO Kiyoto  <kiyoto@soum.co.jp>

	* tls/include/tls_ccs.h: Add comments.
	* tls/include/tls_cert.h: Ditto.
	* tls/include/tls_cipher.h: Ditto.
	* tls/include/tls_compress.h: Ditto.
	* tls/include/tls_handshake.h: Ditto.
	* tls/include/tls_mac.h: Ditto.
	* tls/include/tls_record.h: Ditto.
	* tls/include/tls_session.h: Ditto.
	* tls/include/extension/tls_sighash.h: Ditto.

2015-03-24  URA Hiroshi  <ura@soum.co.jp>

	* tls/test/server.c (run_server): Improve in order to check
	vulnerabilities using testssl.sh script.

2015-03-24  HAMANO Kiyoto  <kiyoto@soum.co.jp>

	* tls/hs: Remove (unnecessary empty directory).
	* tls/ext: Ditto.
	* tls/include/ext: Ditto.

2015-03-24  SAKANE Eisaku  <sakane@nii.ac.jp>

	* smime/Makefile.am: Add mime-test to check_PROGRAMS.

2015-03-20  HAMANO Kiyoto  <kiyoto@soum.co.jp>

	* tls/: Add new module: TLS 1.2.

2015-03-20  URA Hiroshi  <ura@soum.co.jp>

	* README.en: Note TLS 1.2 support.
	* README.ja: Ditto.

2015-03-16  URA Hiroshi  <ura@soum.co.jp>

	* ssl/ssl_read.c (SSL_analize_header): Add SSL_ERR_PROTOCOL_VERSION
	into the upper 16 bits on ctx->errnum when protocol vesion mismatch
	of the record layer has occurred.
	* ssl/ssl_hs.c (SSL_sv_handshake, SSL_cl_handshake): Mask the 2nd
	argument with 0xff on SSL_send_alert.
	* ssl/ssl.c (SSL_get_error): Return SSL_ERR_PROTOCOL_VERSION when
	protocol vesion mismatch of the record layer has occurred.

2015-03-12  URA Hiroshi  <ura@soum.co.jp>

	* ssl/ssl.c (SSL_get_error): Add new API: SSL_get_error() to get one
	of the error codes if an error occurs.
	* aicrypto/ok_ssl.h: Ditto.

2015-03-05  URA Hiroshi  <ura@soum.co.jp>

	* configure.ac: Check clock_gettime() defined by the librt for
	NRGTLS module.
	* configure: Automatically regenerated.
	* tool/signature.c (P1_sign_digest): Fix the SEGV problem that
	occurs when it signs with a 512-bit RSA key and SHA-384/SHA-512.

2015-03-02  URA Hiroshi  <ura@soum.co.jp>

	* ssl/Makefile.am: Add ssl.h noinst_HEADERS.
	* ssl/Makefile.in: Automatically regenerated.
	* configure.ac: Add tls/Makefile to AC_CONFIG_FILES and switch
	--enable-libnrgtls option to yes by default.
	* configure: Automatically regenerated.

2015-02-23  URA Hiroshi  <ura@soum.co.jp>

	* aicrypto/ok_ssl.h (SSL_set_list_max): Revert to exposing the
	function.
	* ssl/ssl.h: Ditto.
	* aicrypto/ok_ssl.h (SSL_set_vfytype, SSL_set_vfytype, SSL_set_store):
	Revert to exposing the functions and the related macros.
	* ssl/ssl.h: Ditto.
	* aicrypto/ok_ssl.h: Redefine SSL_OPT_CERTREQOPT using
	SSL_OPT_CERTREQ and SSL_OPT_CERTREQOPT_F.

2015-02-19  URA Hiroshi  <ura@soum.co.jp>

	* ssl/ssl.h: Add file.
	* ssl/ssl.h: Separate internal functions and internal macros from
	aicrypto/ok_ssl.h
	* aicrypto/ok_ssl.h: Ditto.
	* ssl/ssl.c: Include "ssl.h"
	* ssl/ssl_alert.c: Ditto
	* ssl/ssl_bind.c: Ditto
	* ssl/ssl_cb.c: Ditto
	* ssl/ssl_cs.c: Ditto
	* ssl/ssl_hello.c: Ditto
	* ssl/ssl_hs.c: Ditto
	* ssl/ssl_hsclnt.c: Ditto
	* ssl/ssl_hskey.c: Ditto
	* ssl/ssl_hsserv.c: Ditto
	* ssl/ssl_list.c: Ditto
	* ssl/ssl_name.c: Ditto
	* ssl/ssl_opssl.c: Ditto
	* ssl/ssl_rand.c: Ditto
	* ssl/ssl_read.c: Ditto
	* ssl/ssl_rec.c: Ditto
	* ssl/ssl_recproc.c: Ditto
	* ssl/ssl_sock.c: Ditto
	* ssl/ssl_tool.c: Ditto
	* ssl/ssl_vfy.c: Ditto
	* ssl/ssl_write.c: Ditto
	* ssl/ssltestfc.c: Ditto
	* ssl/testclient.c: Ditto
	* ssl/testclient2.c: Ditto
	* ssl/testserver.c: Ditto
	* ssl/testserver2.c: Ditto

2015-02-18  URA Hiroshi  <ura@soum.co.jp>

	* ssl/ssl_opssl.c (SSL_get_fd, SSL_set_fd, SSL_get_peer_certificate):
	Replace OpenSSL compatible macros with new function.
	* aicrypto/ok_ssl.h (SSL_get_fd, SSL_set_fd, SSL_get_peer_certificate):
	Ditto.
	* ssl/ssl_tool.c (SSL_get_client_cert, SSL_get_server_cert): Replace
	macros with new function.
	* aicrypto/ok_ssl.h (SSL_get_client_cert, SSL_get_server_cert):
	Ditto.

2015-02-18  URA Hiroshi  <ura@soum.co.jp>

	* ssl/ssl_tool.c (SSL_got_certreq): Add new API: SSL_got_certreq() to
	check whether has received certificate request.

2015-02-17  URA Hiroshi  <ura@soum.co.jp>

	* Makefile.am: Modify ssl/ as conditional directory and add tls/ as
	conditional directory.
	* Makefile.in: Automatically regenerated.
	* configure.ac: Add --enable-libaissl option.
	* configure.ac: Add --enable-libnrgtls option. Disabled by default.
	* configure: Automatically regenerated.

2015-02-16  URA Hiroshi  <ura@soum.co.jp>

	* aes/aes_mode.c (AES_cbc_encrypt, AES_cbc_decrypt): Correct
	implementation of AES-CBC mode.

2015-02-09  URA Hiroshi  <ura@soum.co.jp>

	* aicrypto/ok_ssl.h (SSL_get_fd): Add new API: SSL_get_fd() to get
	file descriptor linked to an SSL object.

2015-10-27  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pem/base64.c: Remove unnecessary header file "aiconfig.h".

2015-04-01  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_sha2.h: Change the type (SHA512_MSGSIZE_T) of 'len'
	of SHA512_CTX to uint64_t [2].
	* aicrypto/ok_sha2.h (OK_SHA384, SHA384update, OK_SHA512)
	(SHA512update, OK_SHA512224, SHA512224update, OK_SHA512256)
	(SHA512256update): Change the type of message length to 'unsigned
	int' because of the same reason as aicrypto/ok_sha1.h.
	* sha2/sha512.c (OK_SHA384, SHA384update, OK_SHA512, SHA512update)
	(OK_SHA512224, SHA512224update, OK_SHA512256, SHA512256update)
	(_SHA512init, _SHA512update, set_length): Make modification
	accordingly.
	* tool/test_digest.c

2015-03-31  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_sha1.h: Change the type (uint64_t) of 'len' of
	SHA1_CTX to uint32_t [2].
	* aicrypto/ok_sha1.h (OK_SHA1, SHA1update): Change the type of
	message length to 'unsigned int' because the size of "input
	buffer" (not the whole message) will be less than 512MB.
	* sha1/sha1.c (OK_SHA1, SHA1init, SHA1update, set_length): Make
	modification accordingly.
	* sha1/sha1test.c: Add the prototype declaration of the function
	test_sha1().
	* sha1/sha1testfc.c: Clean up.
	* aicrypto/ok_sha2.h: Modify SHA256_CTX the same as
	aicrypto/ok_sha1.h.
	* aicrypto/ok_sha2.h (OK_SHA224, SHA224update, OK_SHA256)
	(SHA256update): Make the same changes as aicrypto/ok_sha1.h.
	* sha2/sha256.c (OK_SHA224, SHA224update, OK_SHA256, SHA256update)
	(_SHA256init, _SHA256update, set_length): Make modification
	accordingly.
	* sha2/sha2test.c: Add the prototype declarations of the functions
	called in main().

2015-03-30  SAKANE Eisaku  <sakane@nii.ac.jp>

	* md2/md2.c (OK_MD2): Change the type of the first argument to
	'unsigned int'.
	* aicrypto/ok_md2.h (OK_MD2): Ditto.
	* md2/md2test.c: Add the prototype declaration of the function
	test_md2().
	* md2/md2testfc.c: Clean up.
	* md5/md5.c (OK_MD5): Ditto to md2/md2.c.
	* aicrypto/ok_md5.h (OK_MD5): Ditto.
	* md5/md5test.c: Ditto to md2/md2test.c.
	* md5/md5testfc.c: Clean up.
	* tool/test_digest.c: New file.
	* test/Makefile.am: Add digest-test to TESTS.

2015-03-11  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/md_global.h: Replace the macro PROTOTYPES with __STDC__.

2015-02-19  SAKANE Eisaku  <sakane@nii.ac.jp>

	* store/sto_add.c (CStore_add_bag, CS_cert2bag, CS_crl2bag,
	CS_req2bag, CS_key2bag, CS_der2bag, CS_encder2bag): Silence the
	warning issued by the option "-Wshadow".
	* ssl/ssl_read.c (SSL_calc_mac): Likewise.

2015-02-18  SAKANE Eisaku  <sakane@nii.ac.jp>

	* lnm/large_divmod.c (LN_div, LN_mod, LN_div_mod): Silence the
	warning issued by the option "-Wshadow".
	* dsa/dsa_gen.c (check_selection_appropriateness): Likewise.
	* x509/cert_print.c (print_v3_extensions): Likewise.
	* x509/cert_asn1.c (Cert_DER_time): Likewise.

2015-02-14  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pem/base64.c (Base64_encode): Silence the warning issued by the
	option "-Wpointer-sign".
	* pem/pem.c (pem_buf2der, pem_read2der): Likewise.
	* aicrypto/ok_pem.h: Change the prototypes of the functions
	pem_buf2der() and pem_read2der().

2015-02-13  SAKANE Eisaku  <sakane@nii.ac.jp>

	* utf8/uc_jis.c (jis2sjis_in, jis2uni_in, jis2utf_in): Silence the
	warning issued by the option "-Wpointer-sign".
	* utf8/uc_sjis.c (sjis2jis_in, sjis2uni_in, sjis2utf_in): Likewise.
	* utf8/uc_euc.c (euc2sjis_in, euc2uni_in, euc2utf_in): Likewise.
	* utf8/uc_uni.c (uni2jis_in, uni2sjis_in, uni2euc_in, uni2utf_in):
	Likewise.
	* utf8/uc_utf8.c (UC_utf2any): Likewise.
	* utf8/uctestfc.c (make_jis_table, make_sjis_table,
	make_euc_table): Change the return type from 'unsigned char *' to
	'static char *' and also change the second argument's type from
	'int' to 'size_t'.
	* utf8/uctestfc.c (test_jis, test_sjis, test_euc,
	make_sjis_table): Ditto to uc_jis.c.
	* utf8/uctest.c: Add function prototypes.

2015-02-12  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_pem.h: Include <sys/types.h> to fix a compiling error
	on powerpc-apple-darwin8.11.0.
	* sha2/sha512.c (OK_SHA512256): Silence the warning: comparison of
	unsigned expression < 0 is always false.

2015-01-21  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_sha2.h: Introduce SHA512_MSGSIZE_T for the type of
	message length in SHA-384, SHA-512, SHA-512/224, and SHA-512/256.
	* sha2/sha512.c (_SHA512update, set_length, OK_SHA384,
	SHA384update, OK_SHA512, SHA512update, OK_SHA512224,
	SHA512224update, OK_SHA512256, SHA512256update): Change the type
	of argument accordingly.

2015-01-19  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_sha2.h: Change the type of message length variable
	from int to uint64_t.
	* sha2/sha256.c (_SHA256update, set_length, OK_SHA224,
	SHA224update, OK_SHA256, SHA256update, _SHA256update): Change the
	type of argument accordingly.
	* sha2/sha256.c (set_length): Fix the same problem that appears
	the function set_length() in sha1/sha1.c.

2015-01-13  SAKANE Eisaku  <sakane@nii.ac.jp>

	* sha1/sha1.c (OK_SHA1, SHA1update): Remove the meaningless
	expression len < 0.

2015-01-12  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrpyto/ok_sha1.h: Doxygenized.
	* sha1/sha1.c (clear_w): Removed.
	* sha1/sha1.c (set_length): Fix the problem that set_length()
	cannot handle a message whose length is greater than or equal to 512MB.
	* sha1/sha1.c (set_w, set_length, uc2ul, OK_SHA1, SHA1update):
	Change the type of argument.

2014-12-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* sha1/sha1.c: Obey the coding standards.
	* aicrypto/ok_sha1.h: Ditto.

2014-10-30  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tool/io.c (get_file2buf): New function.
	* pem/pem.c (get_file2buf): Removed.
	* aicrypto/ok_io.h: Add the prototype declaration of
	get_file2buf(const char *fname, off_t *len).
	* aicrypto/ok_pem.h: Make modification accordingly.
	* pem/pem.c (pem_read2der): Likewise.
	* pem/pem_key (pem_read_prvkey_2der): Likewise.
	* pem/pem_msg.c (PEM_read_message, PEM_decode_message): Likewise.
	* x509/x509_file.c (get_fformat): Likewise.

2014-10-10  SAKANE Eisaku  <sakane@nii.ac.jp>

	* ssl/testserver2.c (main): Use the macro `linux' for the
	directive with respect to `signal(SIGCLD, SIG_IGN)'.

2014-10-07  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Fix wrong `double equals' sign.

2014-10-01  SAKANE Eisaku  <sakane@nii.ac.jp>

	* doxygen.am: Rename aminclude.am.
	* Makefile.am: Modify the related `include' directive accordingly.

2014-09-20  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/asn1_cert.c (asn1_get_str): Modify the expression according
	to the return type change of UC_conv().
	* pkcs/p12_file.c (print_f_l): Ditto.
	* pkcs/p12_tool.c (P12_add_key, get_dn_for_friendlyname): Ditto.
	* x509/ext_cert.c (Extnew_comment): Ditto.
	* x509/ext_moj.c (Extnew_moj_corpinfo): Ditto.

2014-09-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Fix the help message of DEFAULT_SIG_TYPE.

2014-09-02  SAKANE Eisaku  <sakane@nii.ac.jp>

	* sha3/Makefile.am: Fix the problem that self-test programs failed
	except VPATH builds.
	* configure.ac: Add an AM_CONDITIONAL accordingly.
	* test/Makefile.am: Ditto to sha3/Makefile.am.
	* configure.ac: Bump up the minor version number.

2014-08-22  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pkcs/p12_key.c (P12_gen_key): Fix "Null pointer dereference"
	reported by Cppcheck.
	* store/manager.c (STM_open, stm_file_update, STM_system_new): Fix
	"Dangerous usage of 'buf' (strncpy doesn't always null-terminate
	it)." reported by Cppcheck.

2014-08-21  SAKANE Eisaku  <sakane@nii.ac.jp>

	* lnm/large_mont.c (LNmt_ctx_new): Fix "Memory leak: ctx" reported
	by Cppcheck.
	* store/storetestfc.c (test_manager_new): Variable "command" likewise.
	* asn1/asn1.c (ASN1_octetstring_): Variable "top" likewise.
	* tool/lock.c (OK_init_lock): Variable "ret" likewise.

2014-08-20  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/asn1_ecc.c (ASN1_get_ecpoint): Fix the error,
	"Uninitialized variable: ret", reported by Cppcheck.
	* asn1/asn1_p7sign.c (ASN1_get_authatt): Likewise.
	* cmp/cmptestfc.c (set_dummy_popsig, set_dummy_infotype1): Likewise.
	* lnm/large_sqr.c (LN_sqr_std): Variable "k" likewise.
	* pem/pem_msg.c (PEM_decode_message): Variable "ret" likewise.
	* pkcs/p7_env.c (P7m_decrypt_enveloped): Variables "ret" and
	"decry" likewise.
	* smime/mime.c (Mail_get_str): Variable "ret" likewise.
	* smime/mimebd_multi.c (MBody_multi_get_body): Variable "i" likewise.
	* ssl/ssl_write.c (SSL_write): Variable "ctx" likewise.
	* store/sto_add.c (CS_encder2bag): Variable "tmp" likewise.
	* x509/ext_cert.c (Extnew_crl_distpoint, Extnew_crl_distpoint_):
	Variable "ret" likewise.
	* x509/ext_ip.c (Extnew_ipaddr): Likewise.

2014-07-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_tool.h: Remove the prototype declaration of
	OK_set_pwd_dosmode() because there is no definition anywhere.

2014-06-30  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pem/pem.c (get_file2buf): Change the type of argument 1 from
	'char *' to 'const char *'.
	* aicrypto/ok_pem.h: Make modification accordingly.

2014-06-23  SAKANE Eisaku  <sakane@nii.ac.jp>

	* utf8/uctest.c (main): Modify it to run all tests without
	depending on each result.

2014-06-22  SAKANE Eisaku  <sakane@nii.ac.jp>

	* utf8/uconv.c (UC_conv): Use size_t instead of int.
	* utf8/uc_jis.c (UC_jis2any): Likewise.
	* aicrypto/ok_uconv.h: Likewise.

2014-06-15  SAKANE Eisaku  <sakane@nii.ac.jp>

	* ssl/ssl_hsserv.c (SSL_set_clikeyexchange, SSL_set_certvfy):
	Remove unused variable 'err'.

2014-06-14  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rand/lutzseed.c (seed_stat): Comment out unused variables,
	'path' and 'sys_path'.
	* rand/lutzseed.c (seed_env): Enable it on MS Windows platform
	only because the seed_env() always returns 0 on U*IX platform.
	* rand/rand.c (RAND_init): Modify it accordingly.
	* asn1/asn1.c (ASN1_boolean): Remove unused variable 'ret'.
	* asn1/asn1_extdef.c (ASN1_ext_certpol): Remove unused variable 't'.
	* asn1/asn1_file.c (ASN1_read_der, ASN1_write_der): Modify
	variable scope.
	* asn1/asn1_obj.c: Comment out PCKS12BagID to silence the warning
	issued by the option "-Wunused-variable".
	* pem/pem_w.c (pem_write_buf): Remove unused variable 'err'.
	* pkcs/p12_file.c (P12_read_file): Modify variable scope.
	* pkcs/p11_key.c (P11_rsa_gererate_): Comment out unused
	variables, 'n' and 'e'.
	* pkcs/p11_key.c (P11RSAprv_doCrypt, P11RSApub_doCrypt): Comment
	out unused variable 'bFalse'.
	* pkcs/p11_sess.c (P11_get_rsapub): Likewise.
	* x509/ext_crtstr.c (get_polqualinfo_str): Remove unused variable 'str'.
	* store/man_add.c (STM_crl_type): Remove unused variable 'bag'.
	* store/sto_tool.c (CStore_get_unique_id): Remove unused variable 'j'.
	* ssl/ssl_alert.c (SSL_recv_alert): Remove unused variable 'sv'.
	* ssl/ssl_hsclnt.c (SSL_get_client_certvfy): Remove unused
	variable 'err'.
	* ssl/ssl_hsserv.c (SSL_set_clienthello): Modify variable scope.

2014-06-13  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tool/pass.c (OK_get_passwd): Modify the function so as not to
	change 'ret' if MAX_TRIALS-th trial failed.
	* tool/pass.c: Change MAX_TRIALS and MIN_PWDLEN to TRIAL_MAX and
	PWDLEN_MIN.

2014-06-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* smime/mime_head.c (Mail_get_stdheader): Silence the warning:
	suggest parentheses around assignment used as truth value.
	* smime/mime_dec.c (SMIME_p7s_get_certs, SMIME_p7s_get_msg,
	SMIME_p7m_decrypt): Ditto.
	* ssl/ssl_bind.c (SSL_bind, SSL_listen, SSL_connect): Ditto.
	* ssl/ssl_hs.c (SSL_handshake): Ditto.
	* ssl/ssl_hsclnt.c (SSL_set_certreq): Ditto.
	* ssl/ssl_hsserv.c (SSL_set_clienthello): Ditto.
	* ssl/ssl_sock.c (SSL_shutdown): Ditto.
	* aicrypto/ok_tool.h: Add macros M_VRFY and M_NOVRFY for the third
	argument of OK_get_passwd().
	* tool/pass.c (OK_get_passwd): Add macros MAX_TRIALS and
	MIN_PWDLEN. The latter stands for the minimum length of password.

2014-06-08  SAKANE Eisaku  <sakane@nii.ac.jp>

	* ecdsa/ecdsa.c (ECDSA_sig_in, ECDSA_vfy_in): Silence the warning:
	suggest parentheses around assignment used as truth value.
	* ecdsa/ecdsa_key.c (ECDSApubkey_cmp, ECDSAprvkey_cmp,
	ECDSA_pair_cmp): Ditto.
	* pem/pem.c (PEM_read_req_2der): Ditto.
	* pem/pem_pkcs.c (PEM_read_p7_2der): Ditto.
	* pkcs/p12_asn1.c (P12_DER_certbags, P12_DER_keybag): Ditto.
	* pkcs/p12_tool.c (get_dn_for_friendlyname, P12_get_usercert,
	P12_get_privatekey, P12_check_chain): Ditto.
	* pkcs/p12_mac.c (P12_verify_mac): Ditto.
	* pkcs/p7_sign.c (P7s_verify_signed): Ditto.
	* pkcs/p7s_asn1.c (P7_signed_toDER): Ditto.
	* rsa/rsa_key.c (RSApubkey_cmp, RSAprvkey_cmp, RSA_pair_cmp): Ditto.
	* tool/pass.c (OK_get_passwd): Ditto.
	* x509/cert_vfy.c (Cert_verify): Ditto.
	* x509/cert_tool.c (Cert_dncmp): Ditto.
	* x509/crl_vfy.c (CRL_verify): Ditto.
	* x509/x509_file.c (_read_x509_file, Key_read_file): Ditto.
	* x509/x509_time.c (stmcmp): Ditto.
	* x509/clist_tool.c (Certlist_insert, CRLlist_insert): Ditto.
	* x509/ext_cert.c (Extnew_authkey_id): Ditto.
	* x509/ext_crtstr.c (Ext_asid_str): Ditto.
	* cmp/asn1_pkihd.c (ASN1_cmp_infotype): Ditto.
	* store/man_add.c (STM_cert_type, STM_crl_type): Ditto.
	* store/man_search.c (STM_find_byCert, STM_find_byCRL): Ditto.
	* store/man_tool.c (STM_get_pathcert, STM_get_pathcert_crl,
	STM_get_pathcrl): Ditto.
	* store/sto_file.c (CStore_new_file): Ditto.
	* store/sto_tool.c (get_dn_for_unique_id): Ditto.
	* store/sto_del.c (CStore_del_byKeyHash): Ditto.

2014-06-05  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/asn1_ext.c (ASN1_get_certpol): Silence the warning: suggest
	parentheses around assignment used as truth value.
	* dsa/dsa_key.c (DSApubkey_cmp, DSAprvkey_cmp, DSA_pair_cmp): Ditto.
	* dsa/dsa_sig.c (DSA_sig_in): Ditto.
	* ecc/ecc_gen.c (calc_ec_params, find_nearly_prime): Ditto.
	* ecc/ecc_vfy.c (check_MOV_condition): Ditto.
	* ecc/ecp_tool.c (ECp_cmp): Ditto.

2014-06-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto/ok_x509.h.in: Removed.
	* aicrypto/ok_x509.h: Revival. Then, the GNU Global can analyses
	the header. :D
	* aicrypto/Makefile.am: Make tiny modification accordingly.
	* configure.ac: Make little modification accordingly and set the
	DEFAULT_SIG_TYPE (signature algorithm) to SHA256RSA.
	* Makefile.am: Make tiny modification accordingly.
	* asn1/Makefile.am: Remove unnecessary option for CPP accordingly.
	* cmp/Makefile.am: Ditto.
	* dsa/Makefile.am: Ditto.
	* ecc/Makefile.am: Ditto.
	* ecdsa/Makefile.am: Ditto.
	* pem/Makefile.am: Ditto.
	* pkcs/Makefile.am: Ditto.
	* rsa/Makefile.am: Ditto.
	* smime/Makefile.am: Ditto.
	* spkac/Makefile.am: Ditto.
	* ssl/Makefile.am: Ditto.
	* store/Makefile.am: Ditto.
	* test/Makefile.am: Ditto.
	* tool/Makefile.am: Ditto.
	* x509/Makefile.am: Ditto.

2014-05-22  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Improve SHA3 support for big-endian machines by
	using AC_C_BIGENDIAN macro. [#240, #228]

2014-05-20  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 2.93.
	* configure.ac: Fix the symbol name conflicting problem on OS X
	Snow Leopard and Mavericks. [#239, #141]

2014-05-19  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 2.92.
	* configure.ac: Add SHA3 support for sparc-sun-solaris2.* [#240]
	* sha3/Makefile.am: Likewise.

2014-05-15  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 2.91.
	* dsa/dsa_gen.c (dsapm_gen_p): Rewrite the function based on
	FIPS 186-4, A.1.1.2.

2014-05-13  SAKANE Eisaku  <sakane@nii.ac.jp>

	* dsa/dsa_gen.c (dsapm_gen_q): Rewrite the function based on
	FIPS 186-4, A.1.1.2.
	* aicrypto/large_num.h: Define PROGBAR_{OFF,ON} macros for the
	third argument of the function _LN_miller_rabin().

2014-05-12  SAKANE Eisaku  <sakane@nii.ac.jp>

	* dsa/dsa_gen.c (check_selection_appropriateness): Change the
	prototype so as to set an appropriate Miller-Rabin iterations
	according to the bit length of the prime p (L).

2014-04-21  SAKANE Eisaku  <sakane@nii.ac.jp>

	* sha3/Makefile.am: Add sha3test.h to noinst_HEADERS. Note that
	'make dist' does not include KeccakCodePackage in the archive...

2014-04-20  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Version 2.90.
	* tool/hash.c: Add a directive for HAVE_MD2.
	* aicrypto/version.h: Rename aicrypto/ok_version.h.

2014-04-19  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/Makefile.am: Handle CPPFLAGS more simply.
	* ssl/Makefile.am: Likewise.
	* test/Makefile.am: Likewise.
	* tool/Makefile.am: Likewise.

2014-04-14  SAKANE Eisaku  <sakane@nii.ac.jp>

	* dsa/dsatestfc.c (test_dsa_gen): Replace the magic number "4"
	with a variable "number_tests".

2014-04-12  SAKANE Eisaku  <sakane@nii.ac.jp>

	* sha3/Makefile.am: Add KeccakF-1600-reference32BI.c
	instead of KeccakF-1600-inplace32BI.c to keccak_SOURCES
	on an OS X (PowerPC).
	* configure.ac: Add an AM_CONDITIONAL() for PPC32 accordingly.

2014-04-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rc4/rc4testfc.c: Fix the global array overrun. [#142]

2014-04-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aicrypto: New directory for headers.
	* include: Removed.

2014-03-26  URA Hiroshi  <ura@soum.co.jp>

	* README.en: Note that support the SHA-3 family.
	* README.ja: Ditto.

2014-03-19  URA Hiroshi  <ura@soum.co.jp>

	* sha3/README.keccak: New file.

2014-03-17  URA Hiroshi  <ura@soum.co.jp>

	* sha3/sha3.c: Clean up.
	* sha3/sha3.c (SHAKE128final2, SHAKE256final2): Change the unit of
	the len argument from bit to byte.
	* include/nrg_sha3.h: Ditto.
	* include/nrg_sha3.h: Define DEFAULT_SHAKE_DIGESTSIZE.

2014-03-17  ISHIBASHI Takuya <takuya@soum.co.jp>

	* ssl/ssl_read.c: Fix illegal message of SSL Record Layer when
	using Stream Cipher.
	* ssl/ssl_recproc.c: Ditto.

2014-03-12  URA Hiroshi  <ura@soum.co.jp>

	* sha3/sha3test.c: Makes it compilable by clang-3.4.
	* sha3/sha3testfc.c: Ditto.
	* sha3/sha3test.h: New file.

2014-03-12  ISHIBASHI Takuya <takuya@soum.co.jp>

	* ssl/ssl_recproc.c: Use variable padding length and fix wrong
	padding length, for the compatibility of SSL communication.
	* ssl/ssl_cs.c: Ditto.

2014-03-11  URA Hiroshi  <ura@soum.co.jp>

	* tool/digest.c (OK_do_digest): Obey the coding standards.
	* tool/digest.c (OK_do_digest): Refacoring using by
	gethashalgobyaioid() and fix memeory leak when ret is NULL.
	* include/ok_tool.h: Replace the comment of OK_do_digest() with
	doxygen style.

2014-03-08  URA Hiroshi  <ura@soum.co.jp>

	* tool/hash.c: Add SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128,
	and SHAKE256 to hash_algorithms[].
	* include/ok_tool.h: Ditto.
	* include/ok_tool.h: Raise AC_MAX_DIGESTSIZE to
	DEFAULT_SHAKE256_DIGESTSIZE.

2014-03-08  URA Hiroshi  <ura@soum.co.jp>

	* sha3/sha3test.c: New file.
	* sha3/sha3testfc.c: Ditto.
	* sha3/sha3test.c: Add testcases for SHA-3.
	* sha3/sha3testfc.c: Ditto.
	* sha3/Makefile.am: Ditto.
	* sha3/Makefile.in: Generated from include/Makefile by automake.

2014-03-08  URA Hiroshi  <ura@soum.co.jp>

	* sha3/Makefile.am: Use KeccakF-1600-opt64.c as the Keecak engine
	when LP64 is enabled.
	* sha3/Makefile.in: Generated from include/Makefile by automake.
	* configure.ac: Add check for LP64 and new option
	--disable-keccak-opt64.
	* configure: Automatically regenerated.

2014-03-06  URA Hiroshi  <ura@soum.co.jp>

	* sha3/sha3.c: Rename _SHA3init(), _SHA3update(), and _SHA3final()
	to SHA3init(), SHA3update(), and SHA3final().
	* sha3/sha3.c: Remove unnecessary include file.
	* include/nrg_sha3.h: Ditto.
	* include/Makefile.am: Add nrg_sha3.h to include_HEADERS.
	* include/Makefile.in: Generated from include/Makefile by automake.

2014-03-06  URA Hiroshi  <ura@soum.co.jp>

	* sha3/sha3.c: Implement SHAKE128 and SHAKE256.
	* include/nrg_sha3.h: Ditto.

2014-03-06  ISHIBASHI Takuya <takuya@soum.co.jp>

	* sha1/sha1.c: Fix wrong message digests of OK_SHA*() if the len is 0.
	* sha2/sha256.c: Ditto.
	* sha2/sha512.c: Ditto.
	* sha1/sha1testfc.c: Add test cases.
	* sha2/sha2testfc.c: Ditto.

2014-03-05  URA Hiroshi  <ura@soum.co.jp>

	* sha3/Makefile.am: New file.
	* sha3/Makefle.in: Generated from sha3/Makefile.am by automake.
	* sha3/sha3.c: New file.
	* sha3/sha3.c: Implement SHA3-224, SHA3-256, SHA3-384, and SHA3-512.
	* include/nrg_sha3.h: New file.
	* include/nrg_sha3.h: Implement SHA3-224, SHA3-256, SHA3-384,
	and SHA3-512.
	* Makefile.am: Add sha3/sha3.la.
	* Makefile.in: Automatically regenerated.
	* configure.ac: Add sha3/Makefile to AC_CONFIG_FILES.
	* configure: Automatically regenerated.

2014-03-03  ISHIBASHI Takuya <takuya@soum.co.jp>

	* ssl/ssl_hsserv.c: Implement new Cipher Suites:
	TLS_RSA_WITH_RC4_128_SHA,
	TLS_RSA_WITH_RC4_128_MD5,
	TLS_RSA_WITH_NULL_SHA256,
	SSL_RSA_WITH_NULL_MD5,
	SSL_RSA_WITH_NULL_SHA
	* ssl/ssl_hskey.c: Ditto.
	* ssl/ssl_write.c: Ditto.
	* ssl/ssl_recproc.c: Ditto.
	* ssl/ssl_cs.c: Ditto.
	* x509/key.c: Ditto.
	* include/ok_asn1.h: Fix a wrong tag name: RC4CBC -> RC4
	* asn1/asn1_obj.c: Ditto.
	* asn1/asn1_print.c: Ditto.

2014-03-02  ISHIBASHI Takuya <takuya@soum.co.jp>

	* configure.ac: Add --enable-ssl2hello option to configure.
	* aiconfig.h.in: Ditto.
	* ssl/ssl_hsclnt.c: Ditto.
	* ssl/ssl_hsserv.c: Ditto.
	* configure: Regenerated by autoconf.

2014-03-01  ISHIBASHI Takuya <takuya@soum.co.jp>

	* ssl/ssl_hsserv.c: Disable SSL Version 2.0 client hello.
	* ssl/ssl_hs.c: Ditto.
	* ssl/ssl_hsclnt.c: Ditto.
	* include/ok_ssl.h: Ditto.

2014-02-27  URA Hiroshi  <ura@soum.co.jp>

	* include/ok_asn1.h: Add OBJ_HASH_xxx for SHA-3

2014-02-27  URA Hiroshi  <ura@soum.co.jp>

	* sha3/KeccakCodePackage:
	Import e11a2c9d9acb56ad9266c24c6e5d28835d386511 from
	KeccakCodePackage Git repository.

2014-02-27  ISHIBASHI Takuya <takuya@soum.co.jp>

	* include/ok_ssl.h: Implement new Cipher Suites:
	TLS_RSA_WITH_AES_256_CBC_SHA256 (default),
	TLS_RSA_WITH_AES_256_CBC_SHA,
	TLS_RSA_WITH_AES_128_CBC_SHA256,
	TLS_RSA_WITH_AES_128_CBC_SHA
	* include/ok_md5.h: Ditto.
	* ssl/ssl_hsclnt.c: Ditto.
	* ssl/ssl_recproc.c: Ditto.
	* ssl/ssl_cs.c: Ditto.
	* ssl/ssl_hsserv.c: Ditto.
	* ssl/ssl_read.c: Ditto.
	* ssl/ssl_hskey.c: Ditto.

2014-02-26  URA Hiroshi  <ura@soum.co.jp>

	* include/ok_asn1.h: Add a description about aioid.
	* include/ok_tool.h: Rename the "id" member of HASHAlgorithm to
	"aioid".
	* tool/hash.c (gethashalgobyid, get_hash_algo): Ditto.
	* tool/hash.c: Rename gethashalgobyid() to gethashalgobyaioid().
	* tool/hash.c: Change function comments to doxygen style.

2014-02-22  URA Hiroshi  <ura@soum.co.jp>

	* tool/hash.c (hash_size, get_hash_algo): Refacoring using by
	gethashalgobyname(), gethashalgobyid()

2014-02-22  URA Hiroshi  <ura@soum.co.jp>

	* include/ok_tool.h: Define HASHAlgorithm as the type of a hash
	algorithm.
	* tool/hash.c: Add HASHAlgorithm hash_algorithms[] as the array of
	hash algorithms.
	* tool/hash.c (gethashalgobyname, gethashalgobyid): New functions.

2014-02-21  URA Hiroshi  <ura@soum.co.jp>

	* tool/hash.c: New file.
	* tool/Makefile.am: Add hash.c to libtool_la_SOURCES.
	* tool/Makefile.in: Automatically regenerated.
	* tool/hash.c (hash_size, get_hash_algo): Move functions from
	tool/sigalgo.c to tool/hash.c.
	* tool/sigalgo.c(hash_size, get_hash_algo): Ditto.
	* include/ok_tool.h: Ditto.

2014-02-20  URA Hiroshi  <ura@soum.co.jp>

	* tool/sigalgo.c (hash_size): Change the argument from OBJ_SIG_XXX
	to OBJ_HASH_XXX.

2014-02-07  SAKANE Eisaku  <sakane@nii.ac.jp>

	* include/large_num.h: Remove "ok_err.h".
	* lnm/large_add.c: Include <ok_err.h>.
	* lnm/large_divmod.c: Ditto.
	* lnm/large_long.c: Ditto.
	* lnm/large_mont.c: Ditto.
	* lnm/large_multi.c: Ditto.
	* lnm/large_set.c: Ditto.
	* lnm/large_shift.c: Ditto.
	* lnm/large_sqr.c: Ditto.
	* lnm/large_sqrt.c: Ditto.
	* lnm/large_sub.c: Ditto.
	* lnm/large_sys.c: Ditto.
	* rsa/rsa.c: Ditto.
	* lnm/testlnm.c (main): Add LN_set_num_s(), LN_set_num(), and
	LN_get_num() for testing.

2014-02-06  SAKANE Eisaku  <sakane@nii.ac.jp>

	* lnm/large_sys.c: Obey the coding standards of the NAREGI-CA.
	* lnm/testlnm.c (main): Add LN_long_sub() for testing.

2014-02-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* include/large_num.h: Add comments for doxygen documentation
	based on Mr. OSAKADA's work.
	* doc/Makefile.am: Add Doxyfile to EXTRA_DIST.

2014-01-29  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rand/randtest.c: Include "aiconfig.h".

2014-01-25  ISHIBASHI Takuya <takuya@soum.co.jp>

	* configure.ac: Add SHA512224RSA and SHA52256RSA for DEFAULT_SIG_TYPE.
	* x509/cert_tool.c: Support OBJ_SIG_SHA512224RSA and
	OBJ_SIG_SHA512256RSA.
	* tool/digest.c: Support OBJ_HASH_SHA512224 and OBJ_HASH_SHA512256.
	* tool/sigalgo.c: Sequel to 2014-01-09.
	* include/ok_asn1.h: Change the numbers of OBJ_SIG_SHA512224RSA,
	OBJ_SIG_SHA512256RSA, OBJ_SIG_SHA224DSA and OBJ_SIG_SHA256DSA.
	* asn1/asn1_obj.c: Ditto.

2014-01-17  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Add a new option --with-efence so as to
	experimentally support Electric Fence for malloc() debugging.

2014-01-09  ISHIBASHI Takuya <takuya@soum.co.jp>

	* sha2/sha512.c: Implement SHA-512/224 and SHA-512/256 functions.
	* include/ok_sha2.h: Ditto.
	* tool/sigalgo.c: Ditto.
	* sha2/sha2testfc.c: Add testcases.
	* sha2/sha2test.c: Ditto.
	* include/ok_asn1.h: Add sha512-224WithRSAEncryption
	sha512-256WithRSAEncryption, id-sha512-224 and id-sha512-256 OIDs.
	* asn1/asn1_obj.c: Ditto.
	* asn1/asn1_print.c: Ditto.
	* x509/cert_print.c: Ditto.

2014-01-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* dsa/dsatest.c: Add function prototypes to silence the warning
	message of compiler.
	* ssl/ssltest.c: Ditto.
	* ssl/testserver.c: Clean up to silence the warning messages of
	compiler such as implicit declaration, unused variable.
	* ssl/testclient.c: Likewise.
	* configure.ac: Change AC_CONFIG_SRCDIR from rand/rand.c to version.c.

2014-01-08  SAKANE Eisaku  <sakane@nii.ac.jp>

	* include/ok_io.h: Include <sys/types.h> to fix a compiling error
	on powerpc-apple-darwin8.11.0.

2014-01-07  SAKANE Eisaku  <sakane@nii.ac.jp>

	* lnm/large_mont.c (LNmt_ctx_new): Add a NULL check. [#122]
	* include/ok_err.h: Add new macro ERR_PT_LNMMONT.
	* tool/error.c (get_err_location): Likewise.

2014-01-06  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aminclude.am: New file.
	* m4/ax_prog_doxygen.m4: Ditto.
	* Makefile.am: Include aminclude.m4 to add targets for Doxygen.
	* configure.ac: Add DX_INIT_DOXYGEN.
	* doc/Doxyfile: New file (based on aaso-dxapi).

2013-12-13  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Modify md2/libmd2.la as conditional library.
	* configure.ac: Add AC_ARG_ENABLE(md2).
	* pkcs/pbe_key.c (PBKDEF1): Add the directive for HAVE_MD2 not to
	call disabled MD2 functions.
	* tool/digest.c (OK_do_digest): Likewise.
	* pem/pemtestfc.c (test_pem_pkcs): Likewise.
	* pkcs/pkcstestfc.c (test_pkcs_p8): Likewise.

2013-12-12  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Set an appropriate key length for ECDSA.
	* asn1/Makefile.am: Change the variable name of common CPPFLAGS
	from "CPPFLAGS" to "cmnCPPFLAGS".
	* ssl/Makefile.am: Ditto.
	* test/Makefile.am: Ditto.
	* tool/Makefile.am: Ditto.

2013-12-11  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Add support for specifying the default digital
	signature algorithm and key length.
	* include/ok_x509.h.in: New file.
	* include/ok_x509.h: Deleted. This file is automatically generated
	from include/ok_x509.h.in by configure.
	* asn1/Makefile.am: Add -I$(top_builddir)/include to *_CPPFLAGS.
	* cmp/Makefile.am: Likewise.
	* dsa/Makefile.am: Likewise.
	* ecc/Makefile.am: Likewise.
	* ecdsa/Makefile.am: Likewise.
	* pem/Makefile.am: Likewise.
	* pkcs/Makefile.am: Likewise.
	* rsa/Makefile.am: Likewise.
	* smime/Makefile.am: Likewise.
	* spkac/Makefile.am: Likewise.
	* ssl/Makefile.am: Likewise.
	* store/Makefile.am: Likewise.
	* tool/Makefile.am: Likewise.
	* x509/Makefile.am: Likewise.
	* test/Makefile.am: Likewise.

2013-12-04  SAKANE Eisaku  <sakane@nii.ac.jp>

	* ssl/testserver.c: Include "aiconfig.h" to define "struct
	addrinfo" correctly.

2013-12-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* pkcs/p7_env.c: Include "aiconfig.h" to define "struct timeval"
	correctly on BSD variants.
	* ssl/ssl_rand.c: Likewise.
	* ssl/testserver2.c (main): Replace the macro __BSD__ with BSD.

2013-10-23  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/asn1_file.c (ANS1_read_der): Modify the difference in
	signedness.
	* rand/lutzseed.c: Include <unistd.h> to silence the warning of
	implicit declaration.
	* ssl/ssl_read.c: Ditto.
	* ssl/ssl_sock.c: Ditto.
	* ssl/ssl_write.c: Ditto.
	* tool/lock.c: Ditto.
	* tool/sigalgo.c: Include <string.h>.

2013-10-21  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tool/io.c (ok_get_flen, ok_get_fdlen): Change the return type
	"int" to "off_t".
	* include/ok_io.h: Modify the prototypes of ok_get_flen() and
	ok_get_fdlen().
	* asn1/asn1_file.c (ASN1_read_der): Change the type of local
	variable sz to "off_t".
	* pem/pem.c (get_file2buf): Ditto.

2013-10-18  SAKANE Eisaku  <sakane@nii.ac.jp>

	* version.c: New file.
	* include/ok_version.h: New file.
	* Makefile.am: Add version.c to libaicrypto_la_SOURCES.

2013-10-17  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Modify the explanation of NRG_STOREDIR.

2013-10-12  SAKANE Eisaku  <sakane@nii.ac.jp>

	* test/Makefile.am: Use check_LTLIBRARIES instead of noinst_*.

2013-10-07  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Support a fine tuning of the installation
	directory, $sysconfdir/naregi/store.
	* ssl/ssl_vfy.c (SSL_set_store): Replace PREFIX with STOREDIR that
	can directly specify the certificate store path.
	* ssl/Makefile.am: Modification following the above.

2013-09-11  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rand/rand.c: Include "aiconfig.h" to fix a segmentation fault.
	* x509/x509_time.c: Likewise.

2013-09-10  SAKANE Eisaku  <sakane@nii.ac.jp>

	* include/large_num.h: Not require the inclusion of "aiconfig.h".
	* include/md_global.h: Ditto.
	* include/ok_des.h: Ditto.
	* include/ok_err.h: Ditto.
	* include/ok_rand.h: Ditto.
	* include/ok_sha1.h: Ditto.
	* include/ok_sha2.h: Ditto.
	* include/ok_ssl.h: Ditto.
	* include/ok_x509.h: Ditto.
	* x509/cert_asn1.c: Include "aiconfig.h".
	* x509/ext_moj.c: Ditto.
	* x509/ext_pol.c: Ditto.

2013-09-07  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add the directories doc/ and wincry/.
	* Makefile.in: Automatically regenerated.
	* configure.ac: Add {doc,wincry}/Makefile to AC_CONFIG_FILES.
	* configure: Automatically regenerated.
	* doc/Makefile.am: New file.
	* doc/Makefle.in: Generated from doc/Makefile.am by automake.
	* wincry/Makefile.am: New file.
	* wincry/Makefile.in: Generated from wincry/Makefile.am by automake.

2013-09-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rand/lutzseed.c: Rename PATH_MAILLOG to PATH_XXXLOG so as to be
	able to select a more suitable logfile than "mail.log" if needed.
	* configure.ac: Modification accompanied with the above.
	* configure.in: Automatically regenerated.
	* Makefile.in: Ditto.

2013-09-02  SAKANE Eisaku  <sakane@nii.ac.jp>

	* tool/lock.c (OK_lock): Replace the macro __LINUX__ with linux.

2013-08-29  SAKANE Eisaku  <sakane@nii.ac.jp>

	* rand/lutzseed.c: Rearrange the header file inclusion.

2013-08-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Add AC_SEARCH_LIBS([dlopen], [dl]) and
	AM_CONDITIONAL([REQUIRE_LIBDL], ...).
	* configure: Automatically regenerated.
	* pkcs/Makefile.am: Improve libpkcs_la_LIBADD as conditional variable.
	* pkcs/Makefile.in: Automatically regenerated.
	* ssl/ssl-session-test.sh: Change the interpreter from /bin/bash
	to /bin/sh :D

2013-08-08  SAKANE Eisaku  <sakane@nii.ac.jp>

	* include/ok_base64.h: Remove unnecessary header "aiconfig.h".
	* include/ok_cmp.h: Ditto.
	* include/ok_dsa.h: Ditto.
	* include/ok_ecc.h: Ditto.
	* include/ok_io.h: Ditto.
	* include/ok_pkcs11.h: Ditto.
	* include/pk_store.h: Ditto.
	* asn1/asn1_file.c: Remove a preprocessor directive for *BSD
	because the O_SYNC is already defined on FreeBSD 8.4.

2013-08-07  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: More improve AC_SEARCH_LIBS([inet_ntop], [nsl])
	and use AM_CONDITIONAL([REQUIRE_LIBNSL], ...).
	* configure: Automatically regenerated.
	* x509/Makefile.am: Add libx509_la_LIBADD as conditional variable.
	* x509/Makefile.in: Automatically regenerated.

2013-08-01  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Improve AC_SEARCH_LIBS([inet_ntop], [nsl]).
	* configure: Automatically regenerated.

2013-07-31  SAKANE Eisaku  <sakane@nii.ac.jp>

	* ssl/Makefile.am: Add a test script ssl-session-test.sh to EXTRA_DIST.
	* ssl/Makefile.in: Automatically regenerated.

2013-07-30  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Add AC_DEFINE(HAVE_ARC4).
	* configure: Automatically regenerated.
	* aiconfig.h.in: Ditto.
	* x509/key.c (Key_free): Change the macro _USE_RC4 to HAVE_ARC4.

2013-07-29  SAKANE Eisaku  <sakane@nii.ac.jp>

	* sha2/Makefile.am: Add sha2.h to noinst_HEADERS to fix ticket:143.
	* sha2/Makefile.in: Automatically regenerated.
	* configure.ac: Add AC_SEARCH_LIBS([inet_ntop], [lnsl]).
	* configure: Automatically regenerated.

2013-07-28  SAKANE Eisaku  <sakane@nii.ac.jp>

	* include/ok_x509.h: Change the type of "x509_crl.version" from
	`long' to `int'.
	* pkcs/p12_tool.c (P12_get_usercert, P12_get_privatekey): Modified
	typecasting in OK_set_error() so as to silence a complier.
	* pkcs/pkcs11.c (P11_init): Ditto.
	* cmp/pkihd_asn1.c (CMP_DER_infotype): Modified typecasting in
	x509_DER_algoid() so as to silence a compiler.
	* cmp/asn1_pkihd.c (ASN1_cmp_infotype): Modified typecasting in
	CMP_infotype_new() ditto to cmp/pkihd_asn1.c.
	* Makefile.am: Add 'include' to SUBDIRS.
	* Makefile.in: Automatically regenerated.
	* configure.ac: Add include/Makefile to AC_CONFIG_FILES.
	* configure: Automatically regenerated.
	* include/Makefile.am: New file.
	* include/Makefile.in: Generated from include/Makefile by automake.

2013-07-27  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add rc4/librc4.la as conditional library.
	* Makefile.in: Automatically regenerated.
	* configure.ac: Add the macro AC_ARG_ENABLE(arc4).
	* configure: Automatically regenerated.
	* rc4/Makefile.am: New file.
	* rc4/Makefile.in: Generated from rc4/Makefile.am by automake.
	* rc4/rc4key.c: Abolish the use of the macros FREE and MALLOC.
	* rc4/rc4.c: Remove the macro _USE_RC4
	* rc4/rc4test.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* pkcs/Makefile.am: Add -ldl to libpkcs_la_LIBADD.
	* pkcs/Makefile.in: Automatically regenerated.
	* store/Makefile.am: Rid libstore_la_SOURCES of storetestfc.c.
	* store/Makefile.in: Automatically regenerated.

2013-07-26  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Comment out the macro AC_FUNC_MKTIME due to a bug
	in Autoconf-2.61, and add timegm() to AC_CHECK_FUNCS().
	* configure: Automatically regenerated.
	* aiconfig.h.in: Ditto.
	* ssl/ssltest.c: New file.
	* ssl/ssltestfc.c: Add VPATH builds support.
	* ssl/testserver.c: Ditto.
	* ssl/testclient.c: Ditto.

2013-07-25  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add smime/libsmime.la.
	* Makefile.in: Automatically regenerated.
	* configure.ac: Add smime/Makefile to AC_CONFIG_FILES.
	* configure.in: Automatically regenerated.
	* smime/Makefile.am: New file.
	* smime/Makefile.in: Generated from smime/Makefile.am by automake.
	* smime/smime_enc.c: Abolish the use of the macros FREE and MALLOC.
	* smime/mimebd_msg.c: Ditto.
	* smime/mime_body.c: Abolish the use of the macro STRDUP.
	* smime/mimebd_bin.c: Ditto to smime/smime_enc.c.
	* smime/smime_dec.c: Ditto.
	* smime/mimebd_multi.c: Ditto.
	* smime/mime.c: Ditto.
	* smime/mimebd_smime.c: Ditto.
	* smime/mime_head.c: Ditto to smime/mime_body.c.
	* smime/smimetest.c: Use the macros EXIT_{FAILURE,SUCCESS}.
	* smime/mimebd_txt.c: Ditto to smime/smime_enc.c.
	* ssl/Makefile.am: New file.
	* ssl/Makefile.in: Generated from ssl/Makefile.am by automake.
	* ssl/ssl.c: Abolish the use of the macros AIFREE and AIMALLOC.
	* ssl/ssl_rand.c: Rearrange the header file inclusion.
	* ssl/ssl_write.c: Abolish the use of the macro ULONG.
	* ssl/ssl_hsclnt.c: Ditto to ssl/ssl.c.
	* ssl/testclient.c (test_do): Correct the format in printf(3).
	* ssl/ssl_recproc.c: Ditto to ssl/ssl_rand.c.
	* ssl/ssl_hello.c: Ditto to ssl/ssl.c.
	* ssl/ssl_vfy.c (SSL_set_store): Abolish the use of the macro SNPRINTF.
	* ssl/ssl_rec.c: Ditto to ssl/ssl.c.
	* ssl/ssl_bind.c: Ditto.

2013-07-24  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add ecc/libecc.la, ecdsa/libecdsa.la,
	pem/libpem.la, pkcs/libpkcs.la, cmp/libcmp.la, spkac/libspkac.la,
	and store/libstore.la.
	* Makefile.in: Automatically regenerated.
	* configure.ac: Add {ecc,ecdsa,pem,pkcs,cmp,spkac,store}/Makefile to
	AC_CONFIG_FILES.
	* configure: Automatically regenerated.
	* ecc/Makefile.am: New file.
	* ecc/Makefile.in: Generated from ecc/Makefile.am by automake.
	* ecc/ecctestfunc.c: Add VPATH builds support and replace the
	macro ULONG with uint32_t.
	* ecc/ecc_asn1.c: Abolish the use of the macros FREE, MALLOC and ULONG.
	* ecc/ecc_gen.c: Abolish the use of the macro ULONG.
	* ecc/ecctest.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* ecc/ecc.c: Abolish the use of the macros FREE and MALLOC.
	* ecc/ecp_conv.c: Ditto.
	* ecdsa/Makefile.am: New file.
	* ecdsa/Makefile.in: Generated from ecdsa/Makefile.am by automake.
	* ecdsa/ecdsa.c: Abolish the use of the macros FREE and MALLOC.
	* ecdsa/ecdsatest.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* ecdsa/ecdsa_asn1.c: Ditto to ecdsa/ecdsa.c.
	* ecdsa/ecdsa_key.c: Ditto.
	* ecdsa/ecdsatestfc.c: Add VPATH builds support and abolish the
	use of the macro FREE.
	* pem/Makefile.am: New file.
	* pem/Makefile.in: Generated from pem/Makefile.in by automake.
	* pem/pem_cry.c: Abolish the use of the macros FREE and MALLOC.
	* pem/pem.c: Ditto.
	* pem/pem_pkcs.c: Abolish the use of the macro FREE.
	* pem/pemtest.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* pem/base64.c: Abolish the use of the macros FREE, MALLOC and ULONG.
	* pem/pem_msg.c: Ditto to pem/pem_cry.c.
	* pem/pem_w.c: Ditto.
	* pem/pem_key.c: Ditto to pem/pem_pkcs.c.
	* pem/pemtestfc.c: Add VPATH builds support and abolish the use of
	the macro FREE.
	* pkcs/Makefile.am: New file.
	* pkcs/Makefile.in: Generated from pkcs/Makefile.am by automake.
	* pkcs/p7_env.c: Abolish the use of the macros FREE and MALLOC.
	* pkcs/p11_tool.c: Abolish the use of the macro FREE.
	* pkcs/p11_sess.c: Ditto to pkcs/p7_env.c.
	* pkcs/p12_tool.c: Abolish the use of the macros FREE and MALLOC,
	and replace the macro UC_LOCAL_JCODE with UC_LOCAL_CODESET.
	* pkcs/pkcstest.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* pkcs/p12_file.c: Abolish the use of the macro FREE and replace
	the macro UC_LOCAL_JCODE with UC_LOCAL_CODESET.
	* pkcs/pkcs11.c: Ditto to pkcs/p7_env.c.
	* pkcs/p7s_attr.c: Ditto.
	* pkcs/pkcs12.c: Ditto.
	* pkcs/p7_sign.c: Ditto.
	* pkcs/dec_info.c: Ditto.
	* pkcs/p11_key.c: Ditto.
	* pkcs/pkcstestfc.c: Abolish the use of the macros FREE and
	AIFREE, and add VPATH builds support.
	* pkcs/p12_key.c: Ditto to pkcs/p7_env.c.
	* pkcs/p7_enc.c: Ditto.
	* pkcs/pbe_key.c: Abolish the use of the macro MALLOC.
	* pkcs/p7_data.c: Ditto.
	* pkcs/p12_mac.c: Ditto to pkcs/p7_env.c.
	* pkcs/pbe_cry.c: Ditto.
	* pkcs/p12_asn1.c: Ditto.
	* pkcs/p7m_asn1.c: Ditto.
	* pkcs/p7_file.c: Ditto to pkcs/p11_tool.c.
	* pkcs/p8_file.c: Ditto.
	* pkcs/pkcs7.c: Abolish the use of the macros FREE, MALLOC and STRDUP.
	* pkcs/pkcs8.c: Ditto to pkcs/p7_env.c.
	* pkcs/p7s_asn1.c: Ditto.
	* cmp/Makefile.am: New file.
	* cmp/Makefile.in: Generated from cmp/Makefile.am by automake.
	* cmp/pki_body.c: Abolish the use of the macros FREE and MALLOC.
	* cmp/cmp_asn1.c: Abolish the use of the macros AIMALLOC and AIFREE.
	* cmp/asn1_cmp.c: Abolish the use of the macros FREE.
	* cmp/pki_head.c: Ditto to cmp/pki_body.c.
	* cmp/pkibd_asn1.c: Ditto.
	* cmp/asn1_pkibd.c: Ditto to cmp/asn1_cmp.c.
	* cmp/cmp.c: Ditto to cmp/pki_body.c.
	* cmp/pkihd_asn1.c: Ditto.
	* cmp/asn1_pkihd.c: Ditto to cmp/asn1_cmp.c.
	* cmp/cmptestfc.c: Abolish the use of the macros FREE, MALLOC and
	STRDUP, and add VPATH builds support.
	* cmp/pkimg_asn1.c: Ditto to cmp/pki_body.c.
	* cmp/pki_msg.c: Ditto.
	* spkac/Makefile.am: New file.
	* spkac/Makefile.in: Generated from spkac/Makefile.am by automake.
	* spkac/spkac.c: Abolish the use of the macros FREE, MALLOC and STRDUP.
	* spkac/spkactest.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* spkac/spkac_asn1.c: Abolish the use of the macros FREE and
	MALLOC.
	* spkac/spkactestfc.c: Abolish the use of the macro STRDUP.
	* store/Makefile.am: New file.
	* store/Makefile.in: Generated from store/Makefile.am by automake.
	* store/storetest.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* store/sto_tool.c: Abolish the use of the macro SNPRINTF.
	* store/sto_file.c: Abolish the use of the macros FREE, MALLOC,
	PATH_DELI and STRDUP.
	* store/manager.c: Ditto.
	* store/sto_add.c: Abolish the use of the macros FREE, MALLOC and
	STRDUP.
	* store/sto_filemeth.c: Ditto.
	* store/man_add.c: Abolish the use of the macro STRDUP.
	* store/store.c: Abolish the use of the macros FREE and MALLOC.
	* store/man_asn1.c: Ditto to store/sto_add.c.
	* store/storetestfc.c: Add VPATH builds support.

2013-07-23  SAKANE Eisaku  <sakane@nii.ac.jp>

	* x509/x509test.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* x509/x509testfc.c: Support for VPATH builds.
	* Makefile.am: Add rsa/libdsa.la and dsa/libdsa.la.
	* Makefile.in: Regenerated.
	* configure.ac: Add {rsa,dsa}/Makefile to AC_CONFIG_FILES.
	* configure: Regenerated.
	* rsa/Makefile.am: New file.
	* rsa/Makefile.in: Generated from rsa/Makefile by automake.
	* rsa/rsatestfc.c (test_rsa_pubprv): Abolish the use of the macros
	FREE andn MALLOC.
	* rsa/rsatest.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* rsa/rsa_asn1.c: Ditto to rsa/rsatestfc.c.
	* rsa/rsa_key.c: Abolish the use of the macros FREE, MALLOC and ULONG.
	* dsa/Makefile.am: New file.
	* dsa/Makefile.in: Generated from dsa/Makefile.am by automake.
	* dsa/dsa_key.c: Abolish the use of the macros FREE and MALLOC.
	* dsa/dsa_gen.c: Abolish the use of the macro ULONG.
	* dsa/dsatestfc.c: Add VPATH builds support and abolish the use of
	the macro FREE.
	* dsa/dsa.c: Ditto to dsa/dsa_key.c.
	* dsa/dsatest.c (main): Use the macros EXIT_{FAILURE,SUCCESS}.
	* dsa/dsa_asn1.c: Ditto to dsa/dsa_key.c.
	* dsa/dsa_sig.c: Ditto.

2013-07-22  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add tool/libtool.la and x509/libx509.la.
	* Makefile.in: Regenerated.
	* configure.ac: Add tool/Makefile and x509/Makefile to AC_CONFIG_FILES.
	* configure: Regenerated.
	* tool/Makefile.am: New file.
	* tool/Makefile.in: Generated from tool/Makefile.am by automake.
	* tool/digest.c: Abolish the use of the macros FREE and MALLOC.
	* tool/signature.c: Ditto.
	* tool/pass.c: Ditto.
	* tool/io.c: Rearrange the header file inclusion.
	* tool/lock.c: Ditto to tool/digest.c.
	* tool/locktest.c: Rename the variable "wait" to "wait_msec" to
	avoid conflicting with the function wait(2).
	* x509/Makefile.am: New file.
	* x509/Makefile.in: Generated from x509/Makefile.am by automake.
	* x509/ext_moj.c: Abolish the use of the macros FREE, MALLOC,
	SNPRINTF and STRDUP, and replace UC_LOCAL_JCODE with UC_LOCAL_CODESET.
	* x509/cert_print.c (print_dn): Fix the format in printf(3).
	(print_v3_extensions): Abolish the use of the macro FREE.
	* x509/ext_pol.c: Abolish the use of the macros FREE, MALLOC and
	STRDUP, and replace UC_LOCAL_JCODE with UC_LOCAL_CODESET.
	* x509/req_vfy.c: Ditto to tool/io.c.
	* x509/clist.c: Abolish the use of the macros FREE, MALLOC and STRDUP.
	* x509/x509testfc.c: Abolish the use of macros AIFREE, FREE,
	MALLOC and STRDUP.
	* x509/cert_asn1.c: Abolish the use of the macros FREE and MALLOC,
	and replace UC_LOCAL_JCODE with UC_LOCAL_CODESET.
	* x509/crl.c: Ditto to x509/clist.c.
	* x509/x509_time.c: Abolish the use of the macro MALLOC.
	* x509/ext_gn.c: Abolish the use of the macros AIMALLOC, FREE,
	MALLOC and STRDUP.
	* x509/key_tool.c: Ditto tool/io.c.
	* x509/ext_ip.c: Ditto to tool/digest.c.
	* x509/ext_crlstr.c: Abolish the use of the macros FREE and RTN.
	* x509/cert_tool.c: Abolish the use of the macros FREE, MALLOC,
	SNPRINTF and STRDUP.
	* x509/cert.c: Ditto to x509/clist.c.
	* x509/ext_mojstr.c: Abolish the use of the macro SNRPINTF.
	* x509/ext_crl.c: Ditto to x509/x509_time.c.
	* x509/ext_crtstr.c: Abolish the use of the macros SNPRINTF and RTN.
	(my_snprintf): Invalidated.
	* x509/crl_asn1.c: Ditto to tool/digest.c.
	* x509/x509_file.c: Abolish the use of the macro FREE.
	* x509/crtp.c: Ditto to tool/digest.c.
	* x509/req_asn1.c: Ditto.
	* x509/clist_tool.c: Abolish the use of the macro STRDUP.
	* x509/ext_cert.c: Ditto to x509/ext_pol.c.
	* x509/cert_ext.c: Ditto to tool/digest.c.
	* x509/cert_vfy.c: Ditto to tool/io.c.
	* x509/attr_hc.c: Ditto to tool/digest.c.
	* x509/key.c: Ditto to x509/x509_file.c.
	* x509/crtp_asn1.c: Ditto to tool/digest.c.
	* test/Makefile.am: New file.
	* test/Makefile.in: Generated from test/Makefile.am by automake.

2013-07-20  SAKANE Eisaku  <sakane@nii.ac.jp>

	* asn1/Makefile.am: Set the value of test program's LDADD to the
	module library "-laes" and add tool/{error,io}.c to asn1_test_SOURCES.
	* asn1/Makefile.in: Regenerated.
	* asn1/asn1test.c: Remove a preprocessor directive.
	* aes/Makefile.am: Ditto to asn1/Makefile.am.
	* aes/Makefile.in: Regenerated.
	* des/Makefile.am: Ditto to asn1/Makefile.am.
	* des/Makefile.in: Regenerated.
	* hmac/Makefile.am: Set the value of test program's LDADD to the
	module libraries "-lhmac", "-lsha2", "-lsha1" and "lmd5".
	* hmac/Makefile.in: Regenerated.
	* md2/Makefile.am: Set the value of test program's LDADD to the
	module library "-lmd2".
	* md2/Makefile.im: Regenerated.
	* md5/Makefile.am: Ditto to md2/Makefile.am.
	* md5/Makefile.in: Regenerated.
	* rand/Makefile.am: Ditto to asn1/Makefile.am.
	* rand/Makefile.in: Regenerated.
	* rc2/Makefile.am: Ditto to asn1/Makefile.am.
	* rc2/Makefile.in: Regenerated.
	* sha1/Makefile.am: Ditto to md2/Makefile.am.
	* sha1/Makefile.in: Regenerated.
	* sha2/Makefile.am: Ditto to md2/Makefile.am.
	* sha2/Makefile.in: Regenerated.
	* utf8/Makefile.am: Ditto to asn1/Makefile.am.
	* utf8/Makefile.in: Regenerated.
	* lnm/Makefile.am: Ditto to asn1/Makefile.am.
	* lnm/Makefile.in: Regenerated.

2013-07-19  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add asn1/libasn1.la.
	* Makefile.in: Regenerated.
	* configure.ac: Add asn1/Makefile to AC_CONFIG_FILES and support
	the new macro "UC_LOCAL_CODESET" that obsoletes the macro
	"UC_LOCAL_JCODE".
	* configure: Regenerated.
	* asn1/Makefile.am: New file.
	* asn1/Makefile.in: Generated from asn1/Makefile.am by automake.
	* asn1/asn1.c: Abolish the use of macros FREE and MALLOC.
	* asn1/asn1_attr.c (ans1_coded_data): Abolish the use of the macro
	STRDUP.
	* asn1/asn1_cert.c (asn1_get_str): Replace the macro
	UC_LOCAL_JCODE with UC_LOCAL_CODESET.
	* asn1/asn1_cert.c: Abolish the use of the macros FREE, SNPRINTF
	and STRDUP.
	* asn1/asn1_crtp.c: Remove #include "aiconfig.h".
	* asn1/asn1_ecc.c: Abolish the use of the macro FREE.
	* asn1/asn1_ecdsa.c: Ditto to asn1/asn1_crtp.c.
	* asn1/asn1_ext.c: Abolish the use of the macros FREE, MALLOC and
	STRDUP.
	* asn1/asn1_extdef.c: Ditto to asn1/asn1_attr.c.
	* asn1/asn1_extmoj.c: Ditto to asn1/asn1_ecc.c.
	* asn1/asn1_file.c: Ditto to asn1/asn1.c.
	* asn1/asn1_obj.c: Abolish the use of the macros FREE, STRDUP and ULONG.
	* asn1/asn1_p12.c: Ditto to asn1/asn1_ecc.c.
	* asn1/asn1_p7sign.c: Abolish the use of the macro MALLOC.
	* asn1/asn1_print.c: Ditto to asn1/asn1.c.
	* asn1/asn1_req.c: Ditto to asn1/asn1_crtp.c.
	* asn1/asn1_rsa.c: Ditto.
	* asn1/asn1_spkac.c: Ditto.
	* asn1/asn1test.c: New file.
	* asn1/asn1testfc.c (test_asn1_oid): Abolish the use of the macro
	SNPRINTF.

2013-07-11  SAKANE Eisaku  <sakane@nii.ac.jp>

	* build-aux: Rename config-aux.
	* configure.ac: Modification due to the change above.
	* configure: Regenerated.
	* Makefile.in: Likewise.

2013-07-10  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add lnm/liblnm.la
	* Makefile.in: Regenerated.
	* configure.ac: Add lnm/Makefile to AC_CONFIG_FILES.
	* configure: Regenerated.
	* lnm/Makefile.am: New file.
	* lnm/Makefile.in: Generated from lnm/Makefile.am by automake.
	* include/large_num.h: Abolish the use of the macros ULONG,
	ULLONG, FREE and MALLOC.
	* lnm/large_add.c: Likewise.
	* lnm/large_divmod.c: Likewise.
	* lnm/large_exp.c: Likewise.
	* lnm/large_ext.c: Likewise.
	* lnm/large_kara.c: Likewise.
	* lnm/large_karasqr.c: Likewise.
	* lnm/large_long.c: Likewise.
	* lnm/large_mont.c: Likewise.
	* lnm/large_mtcalc.c: Likewise.
	* lnm/large_multi.c: Likewise.
	* lnm/large_prime.c: Likewise.
	* lnm/large_rand.c: Likewise.
	* lnm/large_set.c: Likewise.
	* lnm/large_shift.c: Likewise.
	* lnm/large_sqr.c: Likewise.
	* lnm/large_sqrt.c: Likewise.
	* lnm/large_sub.c: Likewise.
	* lnm/large_sys.c: Likewise.
	* lnm/large_tool.c: Likewise.
	* lnm/testfunc.c: Likewise.
	* lnm/testlnm.c: Likewise, and use the macros EXIT_{SUCCESS,FAILURE}.
	* lnm/mk_prime.c: Ditto.

2013-07-09  SAKANE Eisaku  <sakane@nii.ac.jp>

	* aes/aes.c: Rearrange the header file inclusion.
	* aes/aes_key.c: Likewise.
	* aes/aes_mode.c: Likewise.
	* include/ok_des.h: Likewise.
	* include/ok_sha2.h: Likewise.
	* include/ok_uconv.h: Likewise.
	* md2/md2.c: Likewise.
	* md2/md2c.c: Likewise.
	* rand/lutzrand.c: Likewise.
	* rc2/rc2.c: Likewise.
	* rc2/rc2key.c: Likewise.
	* rc2/rc2mode.c: Likewise.

2013-07-08  SAKANE Eisaku  <sakane@nii.ac.jp>

	* configure.ac: Add "sys/resource.h" and "sys/times.h" to
	AC_CHECK_HEADERS(). The functions getrusage() and times() are also
	added to AC_CHECK_FUNCS().
	* configure: Regenerated.
	* aiconfig.h.in: Ditto.
	* include/ok_rand.h: Replace HAVE_GETRUSAGE with HAVE_SYS_RESOURCE_H.
	* rand/lutzseed.c (seed_internal): Replace HAVE_SYS_TIMES_H with
	HAVE_TIMES.

2013-07-07  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add rand/librand.la.
	* Makefile.in: Regenerated.
	* configure.ac: Add rand/Makefile to AC_CONFIG_FILES. The 7 macros
	PATH_{TMP,VAR_TMP,PASSWD,WTMP,UTMP,SYSLOG,MAILLOG} are also added.
	* configure: Regenerated.
	* rand/Makefile.am: New file.
	* rand/Makefile.in: Generated from rand/Makefile.am by automake.
	* rand/lutzrand.c: Abolish the use of the macros, ULONG, ULLONG,
	MALLOC, and FREE.
	* rand/lutzseed.c (seed_internal): Fix the wrong macro.
	* rand/randtest.c (main): Use the macros, EXIT_{SUCCESS,FAILURE}.
	* rand/randtestf.c: Replace RTN with "\n".
	* tool/error.c: Abolish the use of the macros ULONG and SNPRINTF.

2013-07-05  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add aes/libaes.la and utf8/libutf8.la.
	* Makefile.in: Regenerated.
	* configure.ac: Add {aes,utf8}/Makefile to AC_CONFIG_FILES.
	* configure: Regenerated.
	* aes/Makefile.am: New file.
	* aes/Makefile.in: Generated from aes/Makefile.am by automake.
	* aes/aes_key.c: Abolish the use of the macros, MALLOC and FREE.
	* aes/aestest.c (main): Use the macros, EXIT_SUCCESS and
	EXIT_FAILURE.
	* utf8/Makefile.am: New file.
	* utf8/Makefile.in: Generated from utf8/Makefile.am by automake.
	* utf8/uc_uni.c: Ditto to aes/aes_key.c.
	* utf8/uctest.c (main): Ditto to aes/aestest.c.
	* utf8/uctestfc.c: Ditto to aes/aes_key.c.

2013-07-04  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add des/libdes.la.
	* Makefile.in: Regenerated.
	* configure.ac: Add des/Makefile to AC_CONFIG_FILES.
	* configure: Regenerated.
	* des/Makefile.am: New file.
	* des/Makefile.in: Generated from des/Makefile.am by automake.
	* des/destest.c (main): Use the macros, EXIT_SUCCESS and
	EXIT_FAILURE.
	* des/3des.c: Abolish the use of the macros, ULONG, ULLONG, MALLOC
	and FREE.
	* des/des.c: Likewise.
	* des/des_key.c: Likewise.
	* des/des_mode.c: Likewise.
	* des/destestfc.c: Likewise.
	* include/ok_des.h: Likewise.

2013-07-03  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add rc2/librc2.la.
	* Makefile.in: Regenerated.
	* configure.ac: Add rc2/Makefile to AC_CONFIG_FILES.
	* configure: Regenerated.
	* rc2/Makefile.am: New file.
	* rc2/Makefile.in: Generated from rc2/Makefile.am by automake.
	* rc2/rc2key.c (RC2key_new_, RC2key_dup): Abolish the use of the
	macro, MALLOC.
	* rc2/rc2key.c (RC2key_free): Abolish the use of the macro, FREE.

2013-07-02  SAKANE Eisaku  <sakane@nii.ac.jp>

	* Makefile.am: Add sha1/libsha1.la, etc.
	* Makefile.in: Regenerated.
	* configure.ac: Add two macros, AC_TYPE_UINT32_T and
	AC_TYPE_UINT64_T to abolish the use of the macros, ULONG and
	UULONG.
	* configure: Regenerated.
	* aiconfig.h.in: Ditto.
	* include/ok_err.h: Replace ULONG and ULLONG macros with uint32_t
	and uint64_t respectively.
	* include/ok_sha1.h: Ditto.
	* sha1/sha1.c: Ditto.
	* lib: Removed.
	* sha2/Makefile.am: New file.
	* sha2/Makefile.in: Generated from sha2/Makefile.am by automake.
	* include/ok_sha2.h: Replace ULONG and ULLONG macros with uint32_t
	and uint64_t respectively.
	* sha2/sha256.c: Likewise.
	* sha2/sha512.c: Likewise.
	* sha2/sha2test.c (main): Use the macros, EXIT_SUCCESS and
	EXIT_FAILURE.
	* md5/Makefile.am: New file.
	* md5/Makefile.in: Generated from md5/Makefile.am by automake.
	* md5/md5test.c (main): Ditto to sha2/sha2test.c.
	* include/md_global.h: Use `uint32_t' to define UINT4.
	* md2/Makefile.am: New file.
	* md2/Makefile.in: Generated from md2/Makefile.am by automake.
	* md2/md2test.c (main): Ditto to sha2/sha2test.c.
	* hmac/Makefile.am: New file.
	* hmac/Makefile.in: Generated from hmac/Makefile.am by automake.
	* hmac/hmactest.c (main): Ditto to sha2/sha2test.c.

2013-07-01  SAKANE Eisaku  <sakane@nii.ac.jp>

	* config-aux: Add files from GNU Automake 1.10 and Libtool
	2.4 (ltmain.sh). However, the two scripts, config.guess and
	config.sub were replaced with ones in Libtool 2.4.
	* m4: Add files from GNU Libtool 2.4.
	* Makefile.am: New file.
	* Makefile.in: Generated from Makefile.am by automake.
	* aclocal.m4: New file generated by aclocal.
	* configure.ac: New file.
	* aiconfig.h.in: Generated from configure.ac by autoheader.
	* configure: Generated from configure.ac by autoconf.
	* sha1/Makefile.am: New file.
	* sha1/Makefile.in: Generated from sha1/Makefile.am by automake.
	* sha1/sha1test.c (main): Use the macros, EXIT_SUCCESS and
	EXIT_FAILURE.

2013-03-11  OSAKADA Takahiro  <osa@soum.co.jp>

	* include/large_num.h: Add comments for doxygen documentation.
	* include/large_prime.h: Ditto.
	* include/ok_aes.h: Ditto.
	* include/ok_hmac.h: Ditto.
	* include/ok_rsa.h: Ditto.
	* include/ok_sha2.h: Ditto.
	* lnm/large_set.c (LN_reset_size): Commented out because it is
	dangerous.
	* lnm/large_sqrt.c (LN_jacobi): Commented out because it is incomplete.
	* lnm/large_prime.c (LN_set_probprime): Modify the function
	declaration to 'static'.
	* include/large_num.h: Remove undefined array rands[] and
	undefined function LN_set_probrand(), and comment out the functions,
	LN_reset_size(), LN_jacobi() and LN_set_probprime().


This ChanegeLog	des not include the changes of NAREGI-CA 2.6.2 (AiCrypto 2.5.1)
or earlier.
