Exception: 9key_error error

2010 May 14 See all posts
Exception: 9key_error error @ Satoshi Nakamoto
Author

Satoshi Nakamoto

Email

Site

https://satoshinakamoto.network

bitcoin2paysafe
Exception: 9key_error error
May 14, 2010, 06:07:50 PM

Today, I've got an error message:

Exception: 9key_error
CKey::CKey(); EC:KEY_new_by_curve_name failed
bitcoin in ThreadBitcoinMiner()

Console:

terminate called after throwing an instance of 'key_error'
  what():  CKey::CKey() : EC_KEY_new_by_curve_name failed
Aborted

I hope that isn't a buffer overflow. Have anybody this error message too?

OS: linux


Satoshi Nakamoto
May 16, 2010, 10:53:59 PM

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

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:
  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 is a constant.