A frequency domain time-reversal (TR) precoder is proposed to perform physical layer security in single-input single-output (SISO) systems using orthogonal frequency-division multiplexing (OFDM) and artificial noise (AN) injection. This scheme guarantees the secrecy of a communication towards a legitimate user, Bob, by exploiting the frequency diversity selective behaviour in multipath channels. The transmitter, Alice, has imperfect channel state information (CSI) of the legitimate link thanks to the channel reciprocity in time division duplex systems and does not know the instantaneous CSI of a potential eavesdropper, Eve. Three optimal decoding structures at Eve are considered in a block fading environment depending on the handshake procedure between Alice and Bob. Closed-form approximations of the signal-to-noise ratio required at Bob and the maximal CSI error that can be made at Alice, in order to guarantee a communication ergodic secrecy rate (ESR), are derived. Furthermore, the optimal amount of AN energy to inject, considering imperfect CSI, is also given as a closed-form expression. A trade-off on the choice of the spreading factor of the TR precoder is established between maximizing the ESR and decreasing the <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$\boldsymbol {\epsilon }-$ </tex-math></inline-formula> achievable secrecy rate. Finally, thanks to these results, Alice can be a priori aware of the ESR over which she can establish a secure communication.