Release lock on context even on error.
Add function to initialize EC parameters from curve name.
Merge pull request #4 from firemagician/master

EC parameters support and fixup on DH parameters race condition.