cryptval_to_sexp: add ability to skip the element in DER

* src/keyinfo.c (cryptval_to_sexp): if elem points to underscore skip
  the current DER element.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Add function to parse private key information

* src/keyinfo.c (privkey_algo_table): Add a table with private key
  description.
* src/keyinfo.c (cryptval_to_sexp): Add mode 3 that parses private keys
  according to privkey_algo_table.
* src/keyinfo.c (_ksba_privkey_to_sexp): Parse der via cryptval_to_sexp.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Add PKCS#8 private key parsing support

* src/ksba.h (ksba_priv_key_s, ksba_priv_key_t): New.
* src/privkey.c: New.
* src/tmttv2.asn (PrivateKeyInfo, PrivateKey): Add from RFC 5208.
* src/visibility.c (ksba_priv_key_new, ksba_priv_key_release,
  ksba_priv_key_parse_der, ksba_priv_key_get_private_key): New.
* tests/t-privkey.c: Simple information dumper for private keys.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Enable optional valgrind for testsuite

* configure.ac: Enable gnulib valgrind module.
* gl/m4/gnulib.m4: Enable valgrind module.
* tests/Makefile.am: Enable valgrind as LOG_COMPILER.
* gl/m4/valgrind-tests.m4: New

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Fix two memory leaks in cert-basic test

* tests/cert-basic.c (one_file): add/move xfree calls to always free
  allocated memory.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Adapt mkoidtbl script to newer dumpasn1 database format

* tests/mkoidtbl.awk: optionally parse oid at OID line.

--

Debian jessie currently has dumpasn1 version 20130608-1. It uses
dumpasn1.cfg with slightly different format:

OID = 0 2 262 1 10
Comment = Deutsche Telekom
Description = Telesec

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Fix memory leak in crl parsing code.

* src/crl.c (store_one_entry_extension): Free memory at oid variable -
  otherwise libksba leaks memory on crl parsing.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Don't add dummy extension, if certificate contained no extensions

* src/cert.c (read_extensions): Handle a case where ASN parser added
  explicit empty extension as if there were no extensions at all.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Update .gitignore

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Add initial Gost support

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>