Hi Dima_t,
In the previous conversation, it was mentioned that "Now I receive code
0x80210000 which is the user identity token is valid but the server has rejected it." That will happen if
UAServer_Callback_login_x509_certificate() returning
FALSE.
Could you please let me know whether it is a same project work space where we are getting these errors(
0x80200000 and
0x80210000)
If
0x80200000 is reported means,
OpcUa_BadIdentityTokenInvalid. Please check the configuration under endpoint security policies as discussed earlier.
If the error is happening in
ua_security_openssl.c line 864, and
certificate_chain data equals to 0 and
certificate_chain length equals to -1. That means in the trust folder there were no certificate(s) to validate.
Please find the PKI directory structure below, if sign / sign & encrypt with security policy Basic128RSA15 and with user token policy x509v3 certificate. (
UA_USER_TOKEN_POLICY_X509v3_CERTIFICATE_TOKEN_SECURITY_POLICY_Basic128Rsa15)
../../Debug/pki/applications
../../Debug/pki/applications/issuers
../../Debug/pki/applications/issuers/certs (This will be empty)
../../Debug/pki/applications/issuers/crl (This will be empty)
../../Debug/pki/applications/issuers/private (This will be empty)
../../Debug/pki/applications/trust
../../Debug/pki/applications/trust/certs/rejected (this will be empty)
../../Debug/pki/applications/trust/certs/ (under this
server.der server certificate should be present. And client certificate if it was rejected and copied to this folder)
../../Debug/pki/applications/trust/crl (this will be empty)
../../Debug/pki/applications/trust/private/ (Under this private key for server certificate should present with name
server_key.pem)
../../Debug/pki/users
../../Debug/pki/users/issuers
../../Debug/pki/users/issuers/certs (this will be empty)
../../Debug/pki/users/issuers/crl (this will be empty)
../../Debug/pki/users/issuers/private (this will be empty)
../../Debug/pki/users/trust
../../Debug/pki/users/trust/certs
../../Debug/pki/users/trust/certs/rejected (this will be empty)
../../Debug/pki/users/trust/certs/ (Under this a server certificate which is used for authentication has to be placed with the name
server.der)
../../Debug/pki/users/trust/crl (this will be empty)
../../Debug/pki/users/trust/private/ (Under this a private key server certificate which is used for authentication has to be placed with the name
server_key.pem)
If this is the directory structure then, While connecting to server, we have to provide the certificate and it's private key. If this is not provided, server will respond saying BadTokenIdInvalid
0x80200000. If proper certificate is provided at the client side while connecting to server, first time when it tries to connect it will put the certificate to rejected folder
../../Debug/pki/users/trust/certs/rejected. we have to move this rejected certificate to
../../Debug/pki/users/trust/certs/.
I hope this will help you to solve the problem. Please let me know if anything is not clear.
Thank you.
Regards,
Basavaraju B V
Edited by user Wednesday, September 30, 2015 10:10:12 PM(UTC)
| Reason: Not specified