ssl: add SslSession structure

This structure is used to store information about a SSL session which
is not only needed for decrypting the session, but also to show nice
dissection information.

In an other patch I will add some more members to the struct because
the old way of passing them to the function does not scale.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: use SslSession

Use the struct SslSession instead of passing the tls version and cipher
to each function.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
ssl: use SslSession

Use the struct SslSession instead of passing the tls version and cipher
to each function.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
ssl-utils: fix TLS number of padding extension

The padding extension got the number 21 (0x15) by the IANA and not 20
(0x14), see this list for details:
https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml

The number 20 is assigned to the server certificate type extension.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
ssl-utils: dissect the certificate type TLS extension

This analyses the certificate type extensions and then stores the
certificate type in the ssl session. This way we can later show the
certificate in the correct from.

This is described in this draft:
https://tools.ietf.org/html/draft-ietf-tls-oob-pubkey-11

Change-Id: Ifdda165807bc29f1fc138da000a9a538ecd18b6e
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
ssl/dtls: add support for Raw Public keys

Instead of X.509 certificates now also Raw public keys are supported
and shown correctly.

This is described in this draft:
https://tools.ietf.org/html/draft-ietf-tls-oob-pubkey-11

Change-Id: Ibe7610aace31a19791b02e71ccd8d9ceb8cf979d
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>