public void validate()

in main/src/main/java/org/apache/james/jdkim/tagvalue/PublicKeyRecordImpl.java [72:87]


    public void validate() {
        super.validate();
        if (containsTag("v")) {
            // if "v" is specified it must be the first tag
            String firstKey = tagSet().iterator().next();
            if (!"v".equals(firstKey))
                throw new IllegalStateException(
                        "Existing v= tag MUST be the first in the record list ("
                                + firstKey + ")");
        }
        if (!"DKIM1".equals(getValue("v")))
            throw new IllegalStateException(
                    "Unknown version for v= (expected DKIM1): " + getValue("v"));
        if ("".equals(getValue("p")))
            throw new IllegalStateException("Revoked key. 'p=' in record");
    }