In this paper, we investigate physical-layer security in a wireless ad hoc network in which a large number of legitimate transmitter-receiver pairs coexist with randomly distributed eavesdroppers; each legitimate receiver works in either half-duplex (HD) or full-duplex (FD) mode. We aim to increase the number of secure links per unit area in the network of interest by determining the allocation between HD- and FD-mode links. We use tools from stochastic geometry theory and analyze the connection outage probability and the secrecy outage probability for an arbitrary legitimate link by deriving analytical expressions, based on which we then figure out the optimal fraction of FD-mode links that maximizes the area secure link number given a pair of wiretap code rates. We further develop insights into this optimal fraction and derive a closed-form expression for it assuming perfect self-interference cancellation. Numerical results are demonstrated to validate our theoretical findings.