A cooperative network in which confidential messages are conveyed from a source to a legitimate destination with the help of decode-and-forward relays in the presence of a malicious eavesdropper is considered. Tight upper bounds on the ergodic secrecy rate are derived in the cases of i) cooperative beamforming and ii) multi-user selection. Further, a new concept of cooperative diversity gain, namely, adapted cooperative diversity gain (ACDG), is investigated. It is shown that the ACDG can be seen as an effective metric to evaluate the security level of a cooperative wireless network in the presence of eavesdroppers. Also, the ACDG obtained in the cooperative beamforming scenario is equal to the traditional cooperative diversity gain of traditional multiple-input single-output networks, while the ACDG obtained in the multiuser scenario is equal to that of traditional single-input multiple-output networks.