adds unsupported_extension behavior to CSR and CSR2

This commit is contained in:
Moisés Guimarães 2017-06-03 13:43:36 -03:00
parent a636858a49
commit c8e5558f3f

View File

@ -2201,8 +2201,8 @@ static int TLSX_CSR_Parse(WOLFSSL* ssl, byte* input, word16 length,
extension = TLSX_Find(ssl->ctx->extensions, TLSX_STATUS_REQUEST);
csr = extension ? (CertificateStatusRequest*)extension->data : NULL;
if (!csr)
return BUFFER_ERROR; /* unexpected extension */
if (!csr) /* unexpected extension */
return TLSX_HandleUnsupportedExtension(ssl);
/* enable extension at ssl level */
ret = TLSX_UseCertificateStatusRequest(&ssl->extensions,
@ -2563,8 +2563,8 @@ static int TLSX_CSR2_Parse(WOLFSSL* ssl, byte* input, word16 length,
csr2 = extension ?
(CertificateStatusRequestItemV2*)extension->data : NULL;
if (!csr2)
return BUFFER_ERROR; /* unexpected extension */
if (!csr2) /* unexpected extension */
return TLSX_HandleUnsupportedExtension(ssl);
/* enable extension at ssl level */
for (; csr2; csr2 = csr2->next) {