I'll let the code do the talking: From key.cpp
bool CKey::SetSecret(const CSecret& vchSecret, bool fCompressed){
<snip>
Nice to see the defensive coding style with intelligent errors.
As soon as I saw "EC_KEY_new_by_curve_name(NID_sect571r1);" I was like, "OHHHH! It was a typo!" good stuff, it's NIST B-571 (I'd feel ever slightly better if it was K-571, or much preferably a non NIST/NSA created curve. But, that's probably rather irrelevant here when almost everyone [including BTC] is using secp256k1, which if any of the NSA ECC weakening horror-predictions are true, is absolutely compromised).
Side thought: this random blabbing about NSA/NIST ECC security makes me think a coin based on Curve25519 (or one of Paulo Baretto's curves) might be a cool idea. I'm a hardcore skeptic, but after the Dual_EC_DRBG mess, it's just hard to trust anything NIST says about crypto, heh. My tinfoil hat keeps me safe, I swear =p.