This is a behavioral change of the API but it conforms to
the RFC4648 expectations.
Resolves: #834
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
** libgnutls: Corrected issue with TLS 1.2 session ticket handling as client
during resumption (#841).
+** libgnutls: gnutls_base64_decode2() succeeds decoding the empty string to
+ the empty string. This is a behavioral change of the API but it conforms
+ to the RFC4648 expectations (#834).
+
** certtool: CRL distribution points will be set in CA certificates even when
non self-signed (#765).
gnutls_datum_t pdata;
struct base64_decode_ctx ctx;
- if (data_size == 0)
- return gnutls_assert_val(GNUTLS_E_BASE64_DECODING_ERROR);
+ if (data_size == 0) {
+ result->data = (unsigned char*)gnutls_strdup("");
+ result->size = 0;
+ return 0;
+ }
ret = cpydata(data, data_size, &pdata);
if (ret < 0) {
};
struct decode_tests_st decode_tests[] = {
+ {
+ .name = "empty",
+ .pem = "",
+ .raw = {(void*)"", 0},
+ .res = 0
+ },
{
.name = "dec-rnd1",
.pem = "9ppGioRpeiiD2lLNYC85eA==",
.raw = {(void*)"\x2c\x9f\xfb\x85\x46\x77\x4e\xd3\xc8\xcf\x67\x65\x73\x9f\x98\xbc\x42\xde\xf9", 19},
.res = GNUTLS_E_BASE64_DECODING_ERROR
},
- {
- .name = "dec-empty",
- .pem = "",
- .raw = {(void*)"", 1},
- .res = GNUTLS_E_BASE64_DECODING_ERROR
- },
{
.name = "dec-invalid-suffix",
.pem = "LJ/7hUZ3TtPIz2dlc5+YvELe+Q==XXX",