Release lock on context even on error.
Add function to initialize EC parameters from curve name.