tinydtls: remove certificate_list length field for raw public keys
tinydtls: remove certificate_list length field for raw public keys

This fixes https://jira.iotivity.org/browse/IOT-715
This patch introduces an API incompatible change, old IoTivity clients
using Raw Public key will not be able to communicate with clients
with this change.

backport of tinydtls upstream commit:
From 71d5f5c9247bbdb5ae1f43533f94c13be1153160 Mon Sep 17 00:00:00 2001
From: Olaf Bergmann <bergmann@tzi.org>
Date: Wed, 26 Aug 2015 21:35:26 +0200
Subject: [PATCH] dtls.c: remove certificate_list length field for raw public
 keys

RFC 7250 has changed the format of the Certificate structure from
RFC 5246 to the following:

opaque ASN.1Cert<1..2^24-1>;

struct {
    select(certificate_type) {

        // certificate type defined in RFC 7250
        case RawPublicKey:
           opaque ASN.1_subjectPublicKeyInfo<1..2^24-1>;

        // X.509 certificate defined in RFC 5246
        case X.509:
           ASN.1Cert certificate_list<0..2^24-1>;
    };
} Certificate;

Thus, there must be no additional length field indicating a
certificate list in case the message contains a raw public key.

Change-Id: I3887fe962548e8e9d0c5bbb9f450073b9f95d1cb
Signed-off-by: Hauke Mehrtens <25520a11a5d284af89d8fc0d70d46c53dc66ea1b@lantiq.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2569
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Sachin Agrawal <e527dde4abdf871552470c254efd4939572046d8@intel.com>

iotivity/iotivity,tienfuc/iotivity-democlient-snap,iotivity/iotivity,santais/iotivity,rzr/iotivity,tienfuc/iotivity-democlient-snap,santais/iotivity_1.1,santais/iotivity,santais/iotivity_1.1,santais/iotivity,rzr/iotivity,tienfuc/iotivity-democlient-snap,santais/iotivity,santais/iotivity,tienfuc/iotivity-democlient-snap,santais/iotivity_1.1,tienfuc/iotivity-democlient-snap,iotivity/iotivity,santais/iotivity_1.1,santais/iotivity_1.1,rzr/iotivity,tienfuc/iotivity-democlient-snap,rzr/iotivity,iotivity/iotivity,santais/iotivity_1.1,rzr/iotivity,tienfuc/iotivity-democlient-snap,iotivity/iotivity,iotivity/iotivity,santais/iotivity_1.1.0,santais/iotivity,santais/iotivity_1.1.0,rzr/iotivity,santais/iotivity_1.1.0,tienfuc/iotivity-democlient-snap,santais/iotivity_1.1,santais/iotivity_1.1.0,santais/iotivity_1.1.0,iotivity/iotivity,santais/iotivity,tienfuc/iotivity-democlient-snap,iotivity/iotivity,tienfuc/iotivity-democlient-snap,santais/iotivity_1.1,santais/iotivity_1.1.0,rzr/iotivity,santais/iotivity_1.1.0