libtls: Check for CHANGE_CIPHER_SPEC type only if upper layer returns NEED_MORE