Bitcointalk

Exception: 9key_error error

中本聪 · 2010 年 5 月 16 日

SN-0538 已核对来源,附原文与上下文。

阅读语言

是每次运行都发生,还是在某个随机时刻只发生过一次?

Does it happen every time you run it, or just happened once at some random time?

我以前从没见过它失败。那是一次对 OpenSSL 的调用,我以为它永远不会失败,但我还是在那里放了个错误检查以防万一。我想不出它会怎么失败。也许是内存耗尽。

I've never seen that fail before. It's a call to OpenSSL that I assumed would never fail, but I put an error check there just in case. I can't imagine how it would fail. Out of memory maybe.

代码是:

The code is:

key.h:

key.h:

EC_KEY* pkey;

EC_KEY* pkey;

pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
        if (pkey == NULL)
            throw key_error("CKey::CKey() : EC_KEY_new_by_curve_name failed");

NID_secp256k1 是个常量。

NID_secp256k1 is a constant.

上下文
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-0538

阅读字号

选择适合你的字号,之后阅读会继续使用。