Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IsEncrypted.cs
1
using
System.Threading.Tasks;
2
using
System.Xml;
3
using
Waher.Content.Xml
;
4
using
Waher.Networking.HTTP.Interfaces
;
5
6
namespace
Waher.Security.WAF.Model.Comparisons
7
{
11
public
class
IsEncrypted
:
WafComparison
12
{
13
private
readonly
int
minSecurityStrength;
14
18
public
IsEncrypted
()
19
: base()
20
{
21
}
22
29
public
IsEncrypted
(XmlElement Xml,
WafAction
Parent,
WebApplicationFirewall
Document
)
30
: base(Xml, Parent,
Document
)
31
{
32
this.minSecurityStrength =
XML
.
Attribute
(Xml,
"minSecurityStrength"
, 0);
33
}
34
38
public
override
string
LocalName
=> nameof(
IsEncrypted
);
39
47
public
override
WafAction
Create
(XmlElement Xml,
WafAction
Parent,
WebApplicationFirewall
Document
) =>
new
IsEncrypted
(Xml, Parent,
Document
);
48
54
public
override
Task<WafResult?>
Review
(
ProcessingState
State)
55
{
56
if
(State.
Request
.Encrypted && State.
Request
.CipherStrength >=
this
.minSecurityStrength)
57
return
this.
ReviewChildren
(State);
58
else
59
return
Task.FromResult<
WafResult
?>(
null
);
60
}
61
}
62
}
Waher.Content.Xml.XML
Helps with common XML-related tasks.
Definition:
XML.cs:21
Waher.Content.Xml.XML.Attribute
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Definition:
XML.cs:1062
Waher.Security.WAF.Model.Comparisons.IsEncrypted
Checks if the request is encrypted.
Definition:
IsEncrypted.cs:12
Waher.Security.WAF.Model.Comparisons.IsEncrypted.Create
override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Creates a WAF action from its XML definition.
Waher.Security.WAF.Model.Comparisons.IsEncrypted.Review
override Task< WafResult?> Review(ProcessingState State)
Reviews the processing state, and returns a WAF result, if any.
Definition:
IsEncrypted.cs:54
Waher.Security.WAF.Model.Comparisons.IsEncrypted.LocalName
override string LocalName
XML Local Name for the XML element defining the action.
Definition:
IsEncrypted.cs:38
Waher.Security.WAF.Model.Comparisons.IsEncrypted.IsEncrypted
IsEncrypted(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Checks if the request is encrypted.
Definition:
IsEncrypted.cs:29
Waher.Security.WAF.Model.Comparisons.IsEncrypted.IsEncrypted
IsEncrypted()
Checks if the request is encrypted.
Definition:
IsEncrypted.cs:18
Waher.Security.WAF.Model.Comparisons.WafComparison
Abstract base class for Web Application Firewall comparisons.
Definition:
WafComparison.cs:9
Waher.Security.WAF.Model.ProcessingState
Contains the current state of a review process.
Definition:
ProcessingState.cs:11
Waher.Security.WAF.Model.ProcessingState.Request
HttpRequest Request
Current HTTP Request
Definition:
ProcessingState.cs:34
Waher.Security.WAF.Model.WafAction
Abstract base class for Web Application Firewall actions.
Definition:
WafAction.cs:17
Waher.Security.WAF.Model.WafAction.Document
WebApplicationFirewall Document
Web Application Firewall document.
Definition:
WafAction.cs:60
Waher.Security.WAF.Model.WafActions.ReviewChildren
async Task< WafResult?> ReviewChildren(ProcessingState State)
Reviews the processing state, and returns a WAF result, if any.
Definition:
WafActions.cs:72
Waher.Security.WAF.WebApplicationFirewall
Web Application Firewall for HttpServer.
Definition:
WebApplicationFirewall.cs:21
Waher.Content.Xml
Definition:
Attribute.cs:7
Waher.Networking.HTTP.Interfaces
Definition:
IFolderResource.cs:2
Waher.Networking.HTTP.Interfaces.WafResult
WafResult
Actions that a Web Server can take after reviewing a request.
Definition:
IWebApplicationFirewall.cs:9
Waher.Security.WAF.Model.Comparisons
Definition:
BytesExceeded.cs:6
IoTGateway
Security
Waher.Security.WAF
Model
Comparisons
IsEncrypted.cs
Generated by
1.9.5