If you are behind a firewall and you need to use a proxy server to get your updates, yum can appear to hang while trying to get the key for the package you are installing.
This may be because Yum calls RPM and RPM does not know about the proxy server.
When you set proxy=http://<my proxy>/ in /etc/yum.conf you are telling Yum about the proxy server that you want it to use. However, yum can call RPM but RPM doesn't read the yum configuration file.
The solution is to put your proxy information into your login script - ~/.bashrc, like this:
export HTTP_PROXY=http://<my proxy>/
Check the man pages for both yum.conf and rpm for more information.