Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos in names of functions. #2523

Merged
merged 5 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ protected override void UpdateItem(ListViewItem listItem, object item)
}

// look up domains.
IList<string> domains = X509Utils.GetDomainsFromCertficate(certificate);
IList<string> domains = X509Utils.GetDomainsFromCertificate(certificate);

StringBuilder buffer = new StringBuilder();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public bool Match(X509Certificate2 certificate)

if (!String.IsNullOrEmpty(m_domain))
{
IList<string> domains = X509Utils.GetDomainsFromCertficate(certificate);
IList<string> domains = X509Utils.GetDomainsFromCertificate(certificate);

bool found = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public static bool HandleDomainCheckError(string caption, ServiceResult serviceR
buffer.AppendFormat("Valid From: {0}\r\n", certificate.NotBefore);
buffer.AppendFormat("Valid To: {0}\r\n", certificate.NotAfter);
buffer.AppendFormat("Thumbprint: {0}\r\n\r\n", certificate.Thumbprint);
var domains = X509Utils.GetDomainsFromCertficate(certificate);
var domains = X509Utils.GetDomainsFromCertificate(certificate);
if (domains.Count > 0)
{
bool comma = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public async Task<bool> ShowDialog(CertificateIdentifier certificate)
// fill in domains.
buffer = new StringBuilder();

foreach (string domain in X509Utils.GetDomainsFromCertficate(data))
foreach (string domain in X509Utils.GetDomainsFromCertificate(data))
{
if (buffer.Length > 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ private void BuildEndpointDescription()
#endregion

#region Public Interface
public EndpointDescriptionCollection AvailableEnpoints
public EndpointDescriptionCollection AvailableEndpoints
{
get { return m_availableEndpoints; }
}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Opc.Ua.Configuration/ApplicationInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ private static async Task<bool> CheckDomainsInCertificateAsync(

bool valid = true;
IList<string> serverDomainNames = configuration.GetServerDomainNames();
IList<string> certificateDomainNames = X509Utils.GetDomainsFromCertficate(certificate);
IList<string> certificateDomainNames = X509Utils.GetDomainsFromCertificate(certificate);

Utils.LogInfo("Server Domain names:");
foreach (var name in serverDomainNames)
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Opc.Ua.Gds.Client.Common/CertificateWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public IList<string> Domains
{
try
{
return X509Utils.GetDomainsFromCertficate(Certificate);
return X509Utils.GetDomainsFromCertificate(Certificate);
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public List<string> GetDomainNames(X509Certificate2 certificate)

if (certificate != null)
{
var names = X509Utils.GetDomainsFromCertficate(certificate);
var names = X509Utils.GetDomainsFromCertificate(certificate);

if (names != null && names.Count > 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ private ServiceResult CreateSigningRequest(
var passwordProvider = m_configuration.SecurityConfiguration.CertificatePasswordProvider;
X509Certificate2 certWithPrivateKey = certificateGroup.ApplicationCertificate.LoadPrivateKeyEx(passwordProvider).Result;
Utils.LogCertificate(Utils.TraceMasks.Security, "Create signing request: ", certWithPrivateKey);
certificateRequest = CertificateFactory.CreateSigningRequest(certWithPrivateKey, X509Utils.GetDomainsFromCertficate(certWithPrivateKey));
certificateRequest = CertificateFactory.CreateSigningRequest(certWithPrivateKey, X509Utils.GetDomainsFromCertificate(certWithPrivateKey));
return ServiceResult.Good;
}

Expand Down
2 changes: 1 addition & 1 deletion Libraries/Opc.Ua.Server/Server/StandardServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2373,7 +2373,7 @@ private void RegistrationValidator_CertificateValidation(CertificateValidator se
{
System.Net.IPAddress[] targetAddresses = Utils.GetHostAddresses(Utils.GetHostName());

foreach (string domain in X509Utils.GetDomainsFromCertficate(e.Certificate))
foreach (string domain in X509Utils.GetDomainsFromCertificate(e.Certificate))
{
System.Net.IPAddress[] actualAddresses = Utils.GetHostAddresses(domain);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ private bool FindDomain(X509Certificate2 serverCertificate, Uri endpointUrl)
bool domainFound = false;

// check the certificate domains.
IList<string> domains = X509Utils.GetDomainsFromCertficate(serverCertificate);
IList<string> domains = X509Utils.GetDomainsFromCertificate(serverCertificate);

if (domains != null && domains.Count > 0)
{
Expand Down
4 changes: 2 additions & 2 deletions Stack/Opc.Ua.Core/Security/Certificates/X509Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static class X509Utils
/// </summary>
/// <param name="certificate">The certificate.</param>
/// <returns>The DNS names.</returns>
public static IList<string> GetDomainsFromCertficate(X509Certificate2 certificate)
public static IList<string> GetDomainsFromCertificate(X509Certificate2 certificate)
{
List<string> dnsNames = new List<string>();

Expand Down Expand Up @@ -179,7 +179,7 @@ public static bool DoesUrlMatchCertificate(X509Certificate2 certificate, Uri end
return false;
}

IList<string> domainNames = GetDomainsFromCertficate(certificate);
IList<string> domainNames = GetDomainsFromCertificate(certificate);

for (int jj = 0; jj < domainNames.Count; jj++)
{
Expand Down
6 changes: 3 additions & 3 deletions Stack/Opc.Ua.Core/Stack/Tcp/TcpListenerChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void SetRequestReceivedCallback(TcpChannelRequestEventHandler callback)
/// <summary>
/// Sets the callback used to raise channel audit events.
/// </summary>
public void SetReportOpenSecureChannellAuditCalback(ReportAuditOpenSecureChannelEventHandler callback)
public void SetReportOpenSecureChannelAuditCallback(ReportAuditOpenSecureChannelEventHandler callback)
{
lock (DataLock)
{
Expand All @@ -111,7 +111,7 @@ public void SetReportOpenSecureChannellAuditCalback(ReportAuditOpenSecureChannel
/// <summary>
/// Sets the callback used to raise channel audit events.
/// </summary>
public void SetReportCloseSecureChannellAuditCalback(ReportAuditCloseSecureChannelEventHandler callback)
public void SetReportCloseSecureChannelAuditCallback(ReportAuditCloseSecureChannelEventHandler callback)
{
lock (DataLock)
{
Expand All @@ -122,7 +122,7 @@ public void SetReportCloseSecureChannellAuditCalback(ReportAuditCloseSecureChann
/// <summary>
/// Sets the callback used to raise channel audit events.
/// </summary>
public void SetReportCertificateAuditCalback(ReportAuditCertificateEventHandler callback)
public void SetReportCertificateAuditCallback(ReportAuditCertificateEventHandler callback)
{
lock (DataLock)
{
Expand Down
12 changes: 6 additions & 6 deletions Stack/Opc.Ua.Core/Stack/Tcp/TcpTransportListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ private void OnReverseHelloComplete(IAsyncResult result)
if (m_callback != null)
{
channel.SetRequestReceivedCallback(new TcpChannelRequestEventHandler(OnRequestReceived));
channel.SetReportOpenSecureChannellAuditCalback(new ReportAuditOpenSecureChannelEventHandler(OnReportAuditOpenSecureChannelEvent));
channel.SetReportCloseSecureChannellAuditCalback(new ReportAuditCloseSecureChannelEventHandler(OnReportAuditCloseSecureChannelEvent));
channel.SetReportCertificateAuditCalback(new ReportAuditCertificateEventHandler(OnReportAuditCertificateEvent));
channel.SetReportOpenSecureChannelAuditCallback(new ReportAuditOpenSecureChannelEventHandler(OnReportAuditOpenSecureChannelEvent));
channel.SetReportCloseSecureChannelAuditCallback(new ReportAuditCloseSecureChannelEventHandler(OnReportAuditCloseSecureChannelEvent));
channel.SetReportCertificateAuditCallback(new ReportAuditCertificateEventHandler(OnReportAuditCertificateEvent));
}
}
catch (Exception e)
Expand Down Expand Up @@ -512,9 +512,9 @@ private void OnAccept(object sender, SocketAsyncEventArgs e)
if (m_callback != null)
{
channel.SetRequestReceivedCallback(new TcpChannelRequestEventHandler(OnRequestReceived));
channel.SetReportOpenSecureChannellAuditCalback(new ReportAuditOpenSecureChannelEventHandler(OnReportAuditOpenSecureChannelEvent));
channel.SetReportCloseSecureChannellAuditCalback(new ReportAuditCloseSecureChannelEventHandler(OnReportAuditCloseSecureChannelEvent));
channel.SetReportCertificateAuditCalback(new ReportAuditCertificateEventHandler(OnReportAuditCertificateEvent));
channel.SetReportOpenSecureChannelAuditCallback(new ReportAuditOpenSecureChannelEventHandler(OnReportAuditOpenSecureChannelEvent));
channel.SetReportCloseSecureChannelAuditCallback(new ReportAuditCloseSecureChannelEventHandler(OnReportAuditCloseSecureChannelEvent));
channel.SetReportCertificateAuditCallback(new ReportAuditCertificateEventHandler(OnReportAuditCertificateEvent));
}

// get channel id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void TearDown()

#region Test Methods
[Test]
public async Task CertifcateStoreTypeNoConfigTest()
public async Task CertificateStoreTypeNoConfigTest()
{
ApplicationInstance application = new ApplicationInstance() {
ApplicationName = "Application",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public static void VerifyApplicationCert(ApplicationTestData testApp, X509Certif
Assert.NotNull(subjectAlternateName);
TestContext.Out.WriteLine(subjectAlternateName.Format(true));
Assert.False(subjectAlternateName.Critical);
var domainNames = X509Utils.GetDomainsFromCertficate(cert);
var domainNames = X509Utils.GetDomainsFromCertificate(cert);
foreach (var domainName in testApp.DomainNames)
{
Assert.True(domainNames.Contains(domainName, StringComparer.OrdinalIgnoreCase));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected void OneTimeSetUp()

#region Test Methods
[Test]
public async Task CertifcateStoreTypeConfigTest()
public async Task CertificateStoreTypeConfigTest()
{
var fileInfo = new FileInfo(Path.Combine(TestContext.CurrentContext.TestDirectory, "Security", "Certificates", "CertificateStoreTypeTestConfig.xml"));
var appConfig = await ApplicationConfiguration.Load(fileInfo, ApplicationType.Client, null).ConfigureAwait(false);
Expand Down
22 changes: 11 additions & 11 deletions Tests/Opc.Ua.Core.Tests/Types/Encoders/EncodeableTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace Opc.Ua.Core.Tests.Types.Encoders
/// <summary>
/// Tests for the IEncodeable classes.
/// </summary>
[TestFixture, Category("EncodableTypes")]
[TestFixture, Category("EncodeableTypes")]
[SetCulture("en-us"), SetUICulture("en-us")]
[Parallelizable]
public class EncodeableTypesTests : EncoderCommon
Expand All @@ -54,13 +54,13 @@ public class EncodeableTypesTests : EncoderCommon
/// Verify encode and decode of an encodeable type.
/// </summary>
[Theory]
[Category("EncodableTypes")]
public void ActivateEncodableType(
[Category("EncodeableTypes")]
public void ActivateEncodeableType(
EncodingType encoderType,
Type systemType
)
{
IEncodeable testObject = CreateDefaultEncodableType(systemType) as IEncodeable;
IEncodeable testObject = CreateDefaultEncodeableType(systemType) as IEncodeable;
Assert.NotNull(testObject);
Assert.False(testObject.BinaryEncodingId.IsNull);
Assert.False(testObject.TypeId.IsNull);
Expand All @@ -72,8 +72,8 @@ Type systemType
}

[Theory]
[Category("EncodableTypes")]
public void ActivateEncodableTypeArray(
[Category("EncodeableTypes")]
public void ActivateEncodeableTypeArray(
EncodingType encoderType,
Type systemType
)
Expand All @@ -83,7 +83,7 @@ Type systemType
ExpandedNodeId dataTypeId = NodeId.Null;
for (int i = 0; i < array.Length; i++)
{
IEncodeable testObject = CreateDefaultEncodableType(systemType) as IEncodeable;
IEncodeable testObject = CreateDefaultEncodeableType(systemType) as IEncodeable;
array.SetValue(testObject, i);
if (dataTypeId == NodeId.Null)
{
Expand Down Expand Up @@ -137,8 +137,8 @@ Type systemType
}

[Theory]
[Category("EncodableTypes")]
public void ActivateEncodableTypeMatrix(
[Category("EncodeableTypes")]
public void ActivateEncodeableTypeMatrix(
EncodingType encoderType,
bool encodeAsMatrix,
Type systemType
Expand All @@ -153,7 +153,7 @@ Type systemType
ExpandedNodeId dataTypeId = NodeId.Null;
for (int i = 0; i < array.Length; i++)
{
IEncodeable testObject = CreateDefaultEncodableType(systemType) as IEncodeable;
IEncodeable testObject = CreateDefaultEncodeableType(systemType) as IEncodeable;
array.SetValue(testObject, i);
if (dataTypeId == NodeId.Null)
{
Expand Down Expand Up @@ -216,7 +216,7 @@ Type systemType
/// Create an instance of an encodeable type with default values.
/// </summary>
/// <param name="systemType">The type to create</param>
private object CreateDefaultEncodableType(Type systemType)
private object CreateDefaultEncodeableType(Type systemType)
{
object instance = Activator.CreateInstance(systemType);
SetDefaultEncodeableType(systemType, instance);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Opc.Ua.Gds.Tests/PushTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected async Task OneTimeSetUp()
RegisterPushServerApplication(m_pushClient.PushClient.EndpointUrl);

m_selfSignedServerCert = new X509Certificate2(m_pushClient.PushClient.Session.ConfiguredEndpoint.Description.ServerCertificate);
m_domainNames = X509Utils.GetDomainsFromCertficate(m_selfSignedServerCert).ToArray();
m_domainNames = X509Utils.GetDomainsFromCertificate(m_selfSignedServerCert).ToArray();

await CreateCATestCerts(m_pushClient.TempStorePath).ConfigureAwait(false);
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Opc.Ua.Gds.Tests/X509TestUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static void VerifySignedApplicationCert(ApplicationTestData testApp, byte
Assert.NotNull(subjectAlternateName);
TestContext.Out.WriteLine($"Issuer Subject Alternate Name: {subjectAlternateName}");
Assert.False(subjectAlternateName.Critical);
var domainNames = X509Utils.GetDomainsFromCertficate(signedCert);
var domainNames = X509Utils.GetDomainsFromCertificate(signedCert);
foreach (var domainName in testApp.DomainNames)
{
Assert.True(domainNames.Contains(domainName, StringComparer.OrdinalIgnoreCase));
Expand Down
Loading