Exploring a cooperative node as a friendly jammer is an effective means of providing secure communication between a source-destination pair in the presence of an eavesdropper. In this work, we consider the use of a wireless-powered friendly jammer. Without relying on external energy supply, the friendly jammer is powered by the source node via wireless power transfer. We apply a simple time-switching protocol where the power transfer and jammer-assisted secure transmission occur in different time blocks. By investigating the long-term behavior of the communication protocol, we derive a closed-form expression of the throughput. We further optimize the jamming power and the rate parameters for maximizing the throughput subject to a secrecy outage probability constraint.