A continuous aperture array (CAPA)-based secure communication system is investigated, where a base station equipped with a CAPA transmits signals to a legitimate user under the existence of an eavesdropper. For improving the secrecy performance, the artificial noise (AN) is employed at the BS for the jamming purpose. We aim at maximizing the secrecy rate by jointly optimizing the information-bearing and AN source current patterns, subject to the maximum transmit power constraint. To solve the resultant non-convex integral-based functional programming problem, a channel subspace-based approach is first proposed via exploiting the result that the optimal current patterns always lie within the subspace spanned by all users' channel responses. Then, the intractable CAPA continuous source current pattern design problem with an infinite number of optimization variables is equivalently transformed into the channel-subspace weighting factor optimization problem with a finite number of optimization variables. A penalty-based successive convex approximation method is developed for iteratively optimizing the finite-size weighting vectors. To further reduce the computational complexity, we propose a two-stage source current patterns design scheme. Specifically, the information-bearing and AN patterns are first designed using the maximal ration transmission and zero-forcing transmission, respectively. Then, the remaining power allocation is addressed via the one-dimensional search method. Numerical results unveil that 1) the CAPA brings in significant secrecy rate gain compared to the conventional discrete multiple-input multiple-output; 2) the proposed channel subspace-based algorithm outperforms the conventional Fourier-based approach, while sustaining much lower computational complexity; and 3) the two-stage ZF-MRT approach has negligible performance loss for the large transmit power regime.