> Shouldn't this be EC_KEY *EC_KEY_dup(const EC_KEY *src); I think the reason it is not is because the EC_KEY has an ENGINE* and that can't be const. Sigh, C needs 'mutable' :)