mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
				synced 2025-11-03 12:17:56 +00:00 
			
		
		
		
	Compare commits
	
		
			11 Commits
		
	
	
		
			PKI2-132_f
			...
			schema_syn
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					1c5909613f | ||
| 
						 | 
					438309714f | ||
| 
						 | 
					a9130eeb75 | ||
| 
						 | 
					33068fca9e | ||
| 
						 | 
					d329151f6c | ||
| 
						 | 
					ec846006bb | ||
| 
						 | 
					242261de0a | ||
| 
						 | 
					31a4edead5 | ||
| 
						 | 
					f7b697f219 | ||
| 
						 | 
					e020da75fc | ||
| 
						 | 
					89702f56e0 | 
@@ -795,4 +795,4 @@ namespace OpenWifi {
 | 
			
		||||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
} // namespace OpenWifi
 | 
			
		||||
} // namespace OpenWifi
 | 
			
		||||
 
 | 
			
		||||
@@ -625,6 +625,9 @@ static std::string DefaultAPSchema = R"foo(
 | 
			
		||||
                    ],
 | 
			
		||||
                    "default": 80
 | 
			
		||||
                },
 | 
			
		||||
                "enable": {
 | 
			
		||||
                    "type": "boolean"
 | 
			
		||||
                },
 | 
			
		||||
                "require-mode": {
 | 
			
		||||
                    "description": "Stations that do no fulfill these HT modes will be rejected.",
 | 
			
		||||
                    "type": "string",
 | 
			
		||||
@@ -3952,8 +3955,10 @@ static std::string DefaultAPSchema = R"foo(
 | 
			
		||||
                            "inactive-deauth",
 | 
			
		||||
                            "key-mismatch",
 | 
			
		||||
                            "beacon-report",
 | 
			
		||||
                            "radar-detected"
 | 
			
		||||
                        ]
 | 
			
		||||
                            "radar-detected",
 | 
			
		||||
                            "ft-finish",
 | 
			
		||||
                            "sta-authorized"
 | 
			
		||||
			 ]
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
@@ -4956,6 +4961,9 @@ static std::string DefaultSWITCHSchema = R"foo(
 | 
			
		||||
                    ],
 | 
			
		||||
                    "default": 80
 | 
			
		||||
                },
 | 
			
		||||
                "enable": {
 | 
			
		||||
                    "type": "boolean"
 | 
			
		||||
                },
 | 
			
		||||
                "require-mode": {
 | 
			
		||||
                    "type": "string",
 | 
			
		||||
                    "enum": [
 | 
			
		||||
@@ -7920,7 +7928,9 @@ static std::string DefaultSWITCHSchema = R"foo(
 | 
			
		||||
                            "inactive-deauth",
 | 
			
		||||
                            "key-mismatch",
 | 
			
		||||
                            "beacon-report",
 | 
			
		||||
                            "radar-detected"
 | 
			
		||||
                            "radar-detected",
 | 
			
		||||
                            "ft-finish",
 | 
			
		||||
                            "sta-authorized"
 | 
			
		||||
                        ]
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
@@ -583,7 +583,7 @@ namespace OpenWifi::RESTAPI::Protocol {
 | 
			
		||||
 | 
			
		||||
	static const char *FIXEDCONFIG = "fixedconfig";
 | 
			
		||||
	static const char *CABLEDIAGNOSTICS = "cable-diagnostics";
 | 
			
		||||
	static const char *REENROLL = "re-enroll";
 | 
			
		||||
	static const char *REENROLL = "reenroll";
 | 
			
		||||
} // namespace OpenWifi::RESTAPI::Protocol
 | 
			
		||||
 | 
			
		||||
namespace OpenWifi::uCentralProtocol {
 | 
			
		||||
@@ -699,7 +699,7 @@ namespace OpenWifi::uCentralProtocol {
 | 
			
		||||
 | 
			
		||||
	static const char *FIXEDCONFIG = "fixedconfig";
 | 
			
		||||
	static const char *CABLEDIAGNOSTICS = "cable-diagnostics";
 | 
			
		||||
	static const char *REENROLL = "re-enroll";
 | 
			
		||||
	static const char *REENROLL = "reenroll";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
} // namespace OpenWifi::uCentralProtocol
 | 
			
		||||
 
 | 
			
		||||
@@ -14,6 +14,7 @@
 | 
			
		||||
#include "nlohmann/json.hpp"
 | 
			
		||||
 | 
			
		||||
#include "Poco/NObserver.h"
 | 
			
		||||
#include <Poco/Net/Context.h>
 | 
			
		||||
#include "Poco/Net/SocketNotification.h"
 | 
			
		||||
#include "Poco/Net/NetException.h"
 | 
			
		||||
#include "Poco/Net/WebSocketImpl.h"
 | 
			
		||||
@@ -71,6 +72,7 @@ namespace OpenWifi {
 | 
			
		||||
				const auto &RootCas =
 | 
			
		||||
					MicroServiceConfigPath("ucentral.websocket.host.0.rootca", "");
 | 
			
		||||
				const auto &Cas = MicroServiceConfigPath("ucentral.websocket.host.0.cas", "");
 | 
			
		||||
				const auto &ClientCasFile = MicroServiceConfigPath("ucentral.websocket.host.0.clientcas", "");
 | 
			
		||||
 | 
			
		||||
				Poco::Net::Context::Params P;
 | 
			
		||||
 | 
			
		||||
@@ -86,6 +88,7 @@ namespace OpenWifi {
 | 
			
		||||
				Poco::Crypto::X509Certificate Cert(CertFileName);
 | 
			
		||||
				Poco::Crypto::X509Certificate Root(RootCaFileName);
 | 
			
		||||
				Poco::Crypto::X509Certificate Issuing(IssuerFileName);
 | 
			
		||||
                std::vector<Poco::Crypto::X509Certificate> ClientCasCerts;
 | 
			
		||||
				Poco::Crypto::RSAKey Key("", KeyFileName, KeyPassword);
 | 
			
		||||
 | 
			
		||||
				DeviceSecureContext->useCertificate(Cert);
 | 
			
		||||
@@ -93,7 +96,11 @@ namespace OpenWifi {
 | 
			
		||||
				DeviceSecureContext->addCertificateAuthority(Root);
 | 
			
		||||
				DeviceSecureContext->addChainCertificate(Issuing);
 | 
			
		||||
				DeviceSecureContext->addCertificateAuthority(Issuing);
 | 
			
		||||
				DeviceSecureContext->addCertificateAuthority(Root);
 | 
			
		||||
                ClientCasCerts = Poco::Net::X509Certificate::readPEM(ClientCasFile);
 | 
			
		||||
                for (const auto &cert : ClientCasCerts) {
 | 
			
		||||
                    DeviceSecureContext->addChainCertificate(cert);
 | 
			
		||||
                    DeviceSecureContext->addCertificateAuthority(cert);
 | 
			
		||||
                }
 | 
			
		||||
				DeviceSecureContext->enableSessionCache(true);
 | 
			
		||||
				DeviceSecureContext->setSessionCacheSize(0);
 | 
			
		||||
				DeviceSecureContext->setSessionTimeout(120);
 | 
			
		||||
@@ -1117,4 +1124,4 @@ namespace OpenWifi {
 | 
			
		||||
	RTTYS_EndPoint::~RTTYS_EndPoint() {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
} // namespace OpenWifi
 | 
			
		||||
} // namespace OpenWifi
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user