private static @NotNull PrivateKeyEntity readDerKey(final byte[] bytes) {
    try {
      UnencryptedPrivateKeyEntity unencrypted = new PKCS8PrivateKey(bytes);
      PrivateKey ignored = unencrypted.get();
      return unencrypted;
    }
    catch (Throwable ignored) {
      return new EncryptedPrivateKeyImpl(bytes);
    }
  }
private static @NotNull PrivateKeyEntity readDerKey(final byte[] bytes)