More checks for malformed data. Tests for invalid DSA keys.