build-sys: add --enable-smartcard=auto

Use same implementation as spice-gtk, to avoid need to explicitely set
smartcard support
gl: ignore if mask has not bitmap

Similar to how sw canvas ignore mask if !bitmap in canvas_mask_pixman().
gl: ignore alpha channel in draw_copy

Similar to sw canvas blit copy operation, and not a blend.
gl: cope with positive stride in put_image()

Keeping the warning, because I don't think this should happen anyway.
gl: use glCopyPixels()

I don't see why the fallback method should be the default.

glCopyTexImage2D and glCopyPixels are equally broken with current Intel
mesa/drivers (I'll be filing a bug). But sw rendering is correct.
Remove INLINE usage

Since inline is c99 and its already used in some files
ssl: Improve error message in cert chain verification

It contains the same information as before, but should be more readable.
ssl: Log an error when peer certificate verification failed

We currently log an error when openssl_verify() is called with
preverify_ok set to 0 for all certificates in the certificate chain
except for the peer certificate (when 'depth' is 0).
This commit logs an error in the latter case as well.
ssl: Don't try hostname check if cert subject check fails

Currently, SSL verification of the peer certificate checks if
the certificate's subject CN or one of its subjectAltName match
the hostname. If this succeeds, then the verification succeeds.
Otherwise openssl_verify() checks the cert subject if this was set,
which means it checks the certificate's subject (not just its CN) matches
exactly the cert subject string that is set in SpiceSession.

Given that the cert subject is something the user specifies in addition
to the hostname, the cert subject check should have priority over the
hostname check, that is, when we have a cert subject set, the
success/failure of the cert subject cert should determine the
success/failure of openssl_verify(), and the hostname check
should only be carried out when no cert subject was set.

This fixes rhbz#871034
codegen: Add a --generate-wireshark-dissector option

The wireshark protocol dissector is a bit out-of-date. Several new channel types
and enums have been added.  It would be nice if these values (and the
translation between the value and the name) could be automatically generated so
that updating the dissector was a slightly less manual process.  This patch adds
a commandline switch which generates both the enums and value-name lists in the
format that wireshark expects.
Be explicit about spice-common license

Use same license as spice-gtk and spice modules (LGPL 2.1) since those licenses
applied to the spice-common submodule in the past.  This makes it more clear
that if you use spice-common separately, the license is still LGPL.  Also
mention license and copyright in generated files.