dtls: fix length in handshake header

The handshake header just contains the length of the handshake message
without the handshake header itself.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: calculate the length of the signed area in the server key exchange

This removes some magic numbers.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: fix representation of unsigned ASN.1 Integer

The ASN.1 specification mandates that a Integer is always signed,
therefor an unsigned integer has to start with a 0 bit. The integer
also has to be represented in its shortest octet form possible without
unneeded leading 0 bytes. This was not the case before and was fixed in
this commit.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: move ecdsa signature element to own function.

There are two positions where an ecdsa signature is added to a message,
extract it to a new functions.

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