public LicenseBlob TryDeserialize(string license, string licenseSource, bool locallySourced)
        {
            LicenseBlob blob;

            try {
                blob = LicenseBlob.Deserialize(license);
            } catch (Exception ex) {
                AcceptIssue(new Issue("Failed to parse license (from " + licenseSource + "):",
                                      LicenseBlob.TryRedact(license) + "\n" + ex, IssueSeverity.Error));
                return(null);
            }
            if (!blob.VerifySignature(TrustedKeys, null))
            {
                sink.AcceptIssue(new Issue(
                                     "License " + blob.Fields.Id + " (from " + licenseSource +
                                     ") has been corrupted or has not been signed with a matching private key.", IssueSeverity.Error));
                return(null);
            }
            if (locallySourced && blob.Fields.MustBeFetched())
            {
                sink.AcceptIssue(new Issue(
                                     "This license cannot be installed directly; it must be fetched from a license server",
                                     LicenseBlob.TryRedact(license), IssueSeverity.Error));
                return(null);
            }
            return(blob);
        }