We investigate secure communications in untrusted energy harvesting relay networks, where the amplify-and-forward relay is an energy constrained node powered by the received radio frequency signals, and try to unauthorizedly decode the confidential information from the source. The secrecy outage probability and connection outage probability are respectively derived in closed-form to evaluate the security and reliability for three energy harvesting strategies, for example, time switching relaying strategy, power splitting relaying strategy, and ideal relaying receiver strategy. Subsequently, the effective secrecy throughput is conducted to characterize the overall efficiency, and the asymptotic analysis of the secrecy throughput is given to determine the optimal energy harvesting strategies in different operating regimes. Furthermore, in order to achieve the optimal effective secrecy throughput performance, a switching threshold between time switching relaying and power splitting relaying is designed. Numerical results verify the accuracy of the analytical expressions and reveal that the effective secrecy throughput of the system can be effectively promoted by the threshold switching energy harvesting strategy.