【问题标题】:compiling cryptdb.dll example from firebird 3.0.3 is not working从 firebird 3.0.3 编译 cryptdb.dll 示例不起作用
【发布时间】:2018-05-08 21:11:58
【问题描述】:

我正在尝试使用 Delphi Tokyo 构建它,当我尝试加密数据库时,我收到了以下消息:

- 加载插件 cryptdb.dll 时出错

- 模块 {FIREBIRDDIR}\plugins\cryptdb.dll 不包含插件 cryptdb.dll 类型 9

我的步骤:

  1. 已安装 Firebird 3.0.3 (NNF)
  2. 将 {FIREBIRDDIR}\examples\dbcrypt\crypdb.pas 重命名为 cryptdb.dpr,然后构建
  3. 已将 cryptdb.dll 复制到 {FIREBIRDDIR}\plugins
  4. isql employee2.fdb -user sysdba -pass masterkey
  5. 使用“cryptdb.dll”更改数据库加密;
  6. 不高兴,出现令人讨厌的错误消息。

任何想法我做错了什么?

【问题讨论】:

  • 假设您已经设置了 plugins.conf 和 firebird.conf 并且在 registerPluginFactory 和 firebird.conf 条目之间匹配了大小写(2017 年 7 月需要),那么这对我有用:SQL> alter database encrypt with cryptDb key纳达;
  • 您使用的是 64 位还是 32 位 Firebird,您将 DLL 编译为 64 位还是 32 位?
  • 我也希望您知道 crypt-plugin 示例是一个玩具示例:它应用了一个非常容易破解的 XOR 算法,因此您不应该在生产中使用该示例并期望它提供任何保护任何东西。
  • @MarkRotteveel:32 位,是的,我只想要“hello world”
  • @FredS:我只是在 plugins.conf 中执行 ctrl-c/ctrl-v 将 UDR 更改为 CRYPTDB。 firebird.conf 上没有任何内容。你能发布你的confs吗?

标签: delphi encryption firebird


【解决方案1】:

正如 Dimitry 在 firebird-support 邮件列表中指出的那样,插件的名称是 cryptdb,而不是 cryptdb.dll

你需要使用

alter database encrypt with cryptdb;

【讨论】:

    【解决方案2】:

    现在我已经验证了我的笔记中的内容仍然有效。 根据需要更改名称

    添加到 plugins.conf:

    Plugin = CRYPTDB {
    Module = $(dir_plugins)/cryptDbPlugIn
    }
    

    加密初始数据库:

    firebird>isql localhost:"..\db\UDFEncr.FDB" -user SYSDBA -pass masterkey
    SQL> alter database encrypt with cryptDb key nada;
    

    7 月份快照随附的 Firebird.pas 文件与快照不匹配。我必须从 Master 编译器生成它。

    URL to GitHub for generated Firebird.pas

    【讨论】:

    • WireCryptPlugin 设置用于有线协议加密,而不是用于数据库加密。更改WireCryptWireCryptPlugin 设置充其量与数据库加密无关,最坏的情况是它会降低安全性,因为Firebird 将不再加密连接,因为插件不是有线协议加密插件。您是否将其与 KeyHolderPlugin 设置混淆了?
    • @Mark Rotteveel:看起来那样,使它工作的解决方案是生成 Firebird.pas。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-06-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-11
    • 2017-02-08
    • 1970-01-01
    相关资源
    最近更新 更多