feat(vncscreen component): added missing handling for serververificat…
…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.
UI.rfb.addEventListener("serververification", UI.serverVerify);
https://github.com/novnc/noVNC/blob/master/app/ui.js#L1085
async serverVerify(e) {
const type = e.detail.type;
if (type === 'RSA') {
const publickey = e.detail.publickey;
let fingerprint = await window.crypto.subtle.digest("SHA-1", publickey);
// The same fingerprint format as RealVNC
fingerprint = Array.from(new Uint8Array(fingerprint).slice(0, 8)).map(
x => x.toString(16).padStart(2, '0')).join('-');
document.getElementById('noVNC_verify_server_dlg').classList.add('noVNC_open');
document.getElementById('noVNC_fingerprint').innerHTML = fingerprint;
}
},
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
- [x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. If you don't have an issue, please create one.
- [x] Prefix your PR title with
feat:,fix:,chore:,docs:, orrefactor:. - [x] The description should clearly illustrate what problems it solves.
- [x] Ensure that the commit messages follow our guidelines.
- [x] Resolve merge conflicts (if any).
- [x] Make sure that the current branch is upto date with the
mainbranch.
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 :)
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!