I have a .net 6 web api project running with kestrel, which hosts an OPC UA client library (OPCLabs easyopc,based on OPCFoundation OPC UA client library). This client library is wrapped inside a nuget package, and generates its own client certificate.
My issue is that when I start the webapi project, the hosted OPC UA client manages to create its own certificate (inside the folder OPC “FoundationCertificateStoresUA Applicationscerts”), and connects to the correct server. After some time (days), I discover another certificate in this folder, called “webapi”, same name as the webapi project…
I struggle to find out why this certificate is created, and why this is placed there in that folder.
I dont use redirection to HTTPS in my webapi, (app.UseHttpsRedirection()), and the clients connecting to the webapi, is through localhost and http.
My question is, what triggers the generation of the webapi certificate? Could this be the underlying OPCFoundation library?
Is is possible to automatically create an webapi certificate if this is not specified?
I have disabled app.UseHttpsRedirection()
Joachim Leite is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.