Replies: 1 comment 1 reply
-
can you post the cert!? or a sample cert!? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been trying to get server-with-encryption.py and client-with-encryption.py to work but have been running into issues.
What is working:
What is not working:
What I have tried:
openssl req -x509 -newkey rsa:4096 -sha256 -keyout pk.pem -out cert.pem -days 3650 -nodes -addext "subjectAltName = URI:urn:myselfsignedserver@xxxxxx,IP: 127.0.0.1,DNS: xxxxxx"
openssl x509 -outform der -in cert.pem -out cert.der
I keep getting:
INFO:asyncua.client.client:connect
INFO:asyncua.client.ua_client.UaClient:opening connection
INFO:asyncua.uaprotocol:updating client limits to: TransportLimits(max_recv_buffer=65535, max_send_buffer=65535, max_chunk_count=1601, max_message_size=104857600)
INFO:asyncua.client.ua_client.UASocketProtocol:open_secure_channel
INFO:asyncua.client.ua_client.UaClient:create_session
WARNING:asyncua.client.ua_client.UASocketProtocol:ServiceFault (BadCertificateInvalid, diagnostics: DiagnosticInfo(SymbolicId=None, NamespaceURI=None, Locale=None, LocalizedText=None, AdditionalInfo=None, InnerStatusCode=None, InnerDiagnosticInfo=None)) from server received in response to CreateSessionRequest
INFO:asyncua.client.ua_client.UASocketProtocol:close_secure_channel
INFO:asyncua.client.ua_client.UASocketProtocol:Request to close socket received
ERROR:main:The certificate provided as a parameter is not valid.(BadCertificateInvalid)
I have also tried changing rsa:2048, -set_serial "0x122b11b1" when making the certificate
I also tried removing setup_self_signed_certificate but it still doesn't work
await setup_self_signed_certificate(
private_key,
cert,
client_app_uri,
host_name,
[ExtendedKeyUsageOID.CLIENT_AUTH],
{
"countryName": "CA",
"stateOrProvinceName": "BC"
},
)
Beta Was this translation helpful? Give feedback.
All reactions