
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
ssl.publickey.checker
Advanced tools
This plugin can be used to add an extra layer of security by preventing 'Man in the Middle' attacks.
This plugin can be used to add an extra layer of security by preventing 'Man in the Middle' attacks
Latest stable version from npm:
$ cordova plugin add ssl.publickey.checker
First obtain the fingerprint of the SSL certificate of your server(s). You can find it f.i. by opening the server URL in Chrome. Then click the green certificate in front of the URL, click 'Connection', 'Certificate details', expand the details and scroll down to the SHA256 fingerprint.
var server = "yourdomainnamehere"; ex: npmjs.com
var fingerprint = "C1 3D 53 79 Z2 YF 82 8E 1E BE FD DC 2D 7B 7D 24 31 1A 59 E1 0B 4B C8 04 6E 21 F6 FA A2 37 11 45";
window.plugins.SSLPublicKeyChecker.check(
successCallback,
errorCallback,
server,
fingerprint);
function successCallback(message) {
alert(message);
// Message is always: CONNECTION_SECURE.
// Now do something with the trusted server.
}
function errorCallback(message) {
alert(message);
if (message === "CONNECTION_NOT_SECURE") {
// There is likely a man in the middle attack going on, be careful!
} else if (message.indexOf("CONNECTION_FAILED") >- 1) {
// There was no connection (yet). Internet may be down. Try again (a few times) after a little timeout.
}
}
Need more than one fingerprint? In case your certificate is about to expire, you can add it already to your app, while still supporting the old certificate. Note you may want to force clients to update the app when the new certificate is activated.
// an array of any number of fingerprints
var fingerprints = ["C1 3D 53 79 Z2 YF 82 8E 1E BE FD DC 2D 7B 7D 24 31 1A 59 E1 0B 4B C8 04 6E 21 F6 FA A2 37 11 45", "ZE ZO ZD", ..];
window.plugins.SSLPublicKeyChecker.check(
successCallback,
errorCallback,
server,
fingerprints);
If you have any questions/feedback, please reach out: venkatschinthakindi11@gmail.com
FAQs
This plugin can be used to add an extra layer of security by preventing 'Man in the Middle' attacks.
The npm package ssl.publickey.checker receives a total of 4 weekly downloads. As such, ssl.publickey.checker popularity was classified as not popular.
We found that ssl.publickey.checker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.