The contributions of this research are threefold. Firstly, a new, specialised Architectural Framework for WMANETs (AF-WMANETs) has been built, independent of any existing network architectures. Secondly, based upon AF-WMANET and exploiting ITU-T X.800 and X.805, a technology-independent Security Architecture for WMANETs has been defined in order to detect, predict, and correct security vulnerabilities. Thirdly, a novel Security Mechanism for Managing the Digital Certificates in WMANETs is defined. Where WMANETs are operating in heterogeneous wireless environments, two algorithms called FM-WMANET and PM-WMANET are proposed for two possible scenarios. FM-WMANET and PM-WMANET algorithms are both evaluated using graph theory and NS-2 network simulator. The results of the two evaluation studies prove that both FM-WMANET and PM-WMANET are fully distributed security protocols that provide a high level of secure, available, scalable, flexible and efficient key management services for WMANETs. A comparative analysis between FM-WMANET and PM-WMANET is also provided.