Peer-to-Peer overlay network provide various services for the feature of storing, discovering and locating resources efficiently. However, P2P platform raise more security-related challenges while providing more services. When P2P security mainly focusing on the security problems on Overlay, this paper first shows in-depth how can security threats intrude from underlay and penetrate into the whole P2P overlay network. A security mechanism is then provided, in which overlay can be aware of the security configuration of underlay, then provides security certificates on P2P network. Two implementation scenarios are listed. This mechanism effectively mitigates the cross-layer security threat.