![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
Deepali Ahirrao
Member
Members
Forum Posts: 25
Member Since:
08/16/2019
08/16/2019
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
We are using OPC java stack (opc-ua-stack-1.4.1.jar) in our client.
We are trying to create UserIdentityToken for the UserTokenType Certificate. Below is the code snippet.
SignatureData signatureData = new SignatureData();
X509IdentityToken x509IdentityToken = EndpointUtil.createX509IdentityToken(endpoint, session.getServerNonce(), session.getClientCertificate(), session.getClientPrivateKey().getPrivateKey(), signatureData);
sessionChannel.activate(x509IdentityToken, signatureData);
The activate method returns an error 'The session id is not valid'. What is it that we are doing wrong? Just a note - the same client certificate is used to create SecureChannel and Session with MessageSecurityMode as SignAndEncrypt.
Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 57
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1415
Posts: 4778