Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
endpointUrl: string | undefined,
endpoint: EndpointDescription
): boolean {
assert(endpoint instanceof EndpointDescription);
const endpoint_securityPolicy = fromURI(endpoint.securityPolicyUri);
if (endpointUrl && endpoint.endpointUrl! !== endpointUrl) {
return false;
}
return (endpoint.securityMode === securityMode && endpoint_securityPolicy === securityPolicy);
}
const defaultSecurityModes = [
MessageSecurityMode.None,
MessageSecurityMode.Sign,
MessageSecurityMode.SignAndEncrypt
];
const defaultSecurityPolicies = [
SecurityPolicy.Basic128Rsa15,
SecurityPolicy.Basic256,
// xx UNUSED!! SecurityPolicy.Basic256Rsa15,
SecurityPolicy.Basic256Sha256
];
endpointUrl: string | undefined,
endpoint: EndpointDescription
): boolean {
assert(endpoint instanceof EndpointDescription);
const endpoint_securityPolicy = fromURI(endpoint.securityPolicyUri);
if (endpointUrl && endpoint.endpointUrl! !== endpointUrl) {
return false;
}
return (endpoint.securityMode === securityMode && endpoint_securityPolicy === securityPolicy);
}
const defaultSecurityModes = [
MessageSecurityMode.None,
MessageSecurityMode.Sign,
MessageSecurityMode.SignAndEncrypt
];
const defaultSecurityPolicies = [
SecurityPolicy.Basic128Rsa15,
SecurityPolicy.Basic256,
// xx UNUSED!! SecurityPolicy.Basic256Rsa15,
SecurityPolicy.Basic256Sha256
];
endpoints = endpoints.filter((e: EndpointDescription) => {
return e.securityMode === MessageSecurityMode.SignAndEncrypt;
});