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

IOP: Create CSR from UA Expert fails for ECC certificates #2550

Closed
1 of 5 tasks
mregen opened this issue Mar 11, 2024 · 2 comments
Closed
1 of 5 tasks

IOP: Create CSR from UA Expert fails for ECC certificates #2550

mregen opened this issue Mar 11, 2024 · 2 comments
Assignees

Comments

@mregen
Copy link
Contributor

mregen commented Mar 11, 2024

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

see ECC branch

Opc.Ua.Core.dll!Opc.Ua.CertificateFactory.CreateSigningRequest(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Collections.Generic.IList<string> domainNames) Line 312
   at D:\Source\Repos\UA-.NETStandard5\Stack\Opc.Ua.Core\Security\Certificates\CertificateFactory.cs(312)

System.ArgumentNullException
 HResult=0x80004003
 Message=Value cannot be null. (Parameter 'key')
 Source=System.Private.CoreLib
 StackTrace:
  at System.ArgumentNullException.Throw(String paramName)
  at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)
  at System.Security.Cryptography.X509Certificates.CertificateRequest..ctor(X500DistinguishedName subjectName, RSA key, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
  at Opc.Ua.CertificateFactory.CreateSigningRequest(X509Certificate2 certificate, IList`1 domainNames) in D:\Source\Repos\UA-.NETStandard5\Stack\Opc.Ua.Core\Security\Certificates\CertificateFactory.cs:line 312

Expected Behavior

CSR is returned to UA Expert

Steps To Reproduce

Connect to ECC enabled ref server with sysadmin credentials, export CSR, null pointer exception

Environment

- OS: Windows
- Environment:
- Runtime:
- Nuget Version: 1.5.375 preview  --> ECC branch
- Component:
- Server:
- Client:

Anything else?

No response

@mregen mregen changed the title Create CSR from UA Expert fails for ECC certificates IOP: Create CSR from UA Expert fails for ECC certificates Mar 11, 2024
@romanett
Copy link
Contributor

romanett commented Mar 29, 2024

reproducable with these input parameters:
image

CertificateFactory.CreateSigningRequest defaults to RSA, we need to check here for ECC Certs:
image

@romanett romanett self-assigned this Mar 31, 2024
@romanett
Copy link
Contributor

fixed with: 3306aa9

#2398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants