static void ensureCompatible(KeyStore newKeystore, KeyStore oldKeystore, boolean allowDnChanges, boolean allowSanChanges) throws GeneralSecurityException {
            List<CertificateEntries> newEntries = CertificateEntries.create(newKeystore);
            List<CertificateEntries> oldEntries = CertificateEntries.create(oldKeystore);

            if (!allowDnChanges) {
                ensureCompatibleDNs(newEntries, oldEntries);
            }

            if (!allowSanChanges) {
                ensureCompatibleSANs(newEntries, oldEntries);
            }
        }
Copy entry from one map into another.

@param destMap   The map to copy entries into.
@param srcMap    The map to copy entries from.
@param key       The entry with this key will be copied
@param <K>       The map key type.
@param <V>       The map value type.
clients/src/main/java/org/apache/kafka/common/security/ssl/SslFactory.java