feat(vncscreen component): added missing handling for serververificat…#62
feat(vncscreen component): added missing handling for serververificat…#62blackcow1987 wants to merge 1 commit intoroerohan:mainfrom
Conversation
…ion event Looking at the example code of novnc, it was developed to handle the serververification event when using RA2ne authentication, but react-vnc lacks the corresponding code, so it was added.
roerohan
left a comment
There was a problem hiding this comment.
Current PR looks good, but an additional feature was requested. Not sure if that is needed though, please let me know accordingly.
| } | ||
|
|
||
| if (e.detail.type === 'RSA') { | ||
| const fingerprint = await window.crypto.subtle.digest("SHA-1", e.detail.publickey) |
There was a problem hiding this comment.
Currently the fingerprint is only logged, it would be better if we could expose the fingerprint (if present) by forwarding the ref to the parent component, so that the fingerprint can be programmatically verified if needed.
The easiest way to do it in my opinion is to assign it to the RFB object (if it has a rfb.fingerprint field?) or just on the VNCScreenHandle object.
P.S. I'm not sure the fingerprint needs to be used by a client in any scenario, but I assume that's the purpose of it - to make sure the fingerprint is in accordance with the VNC server
There was a problem hiding this comment.
I added support for react 19, which has caused some conflicts in the PR. Sorry for the inconvenience, it would be great if you could resolve the merge conflicts.
|
I have found that RSA type connections fail if this event is not handled. I found this issue while testing with RealVNC. I will solve the conflicts :) |
Awesome, thanks a lot for your contribution! |
…ion event
Looking at the example code of novnc, it was developed to handle the serververification event when using RA2ne authentication, but react-vnc lacks the corresponding code, so it was added.
https://github.com/novnc/noVNC/blob/master/app/ui.js#L1085
https://github.com/novnc/noVNC/blob/master/app/ui.js#L1214
Description
Describe your PR here.
Resolved issues
Closes #1
Before submitting the PR, please take the following into consideration
feat:,fix:,chore:,docs:, orrefactor:.mainbranch.