typo - loadPulicKey#11
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to fix a typo in the RSA public key loading call inside the set rsa keys command handler so RSA key generation/configuration can proceed without a method-name error.
Changes:
- Fixes a typo:
loadPulicKey→loadPublicKeywhen loading the configured RSA public key.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $rsa->loadPublicKey($rrdp_config['encryption']['public_key']); | ||
| $rrdp_config['encryption']['public_key_fingerprint'] = $rsa->getFingerprint(); |
There was a problem hiding this comment.
RSA::loadPublicKey() in phpseclib returns a key object; calling it as $rsa->loadPublicKey(...) and then ignoring the return value means $rsa->getFingerprint() is likely operating on the wrong object (and may not exist), so the fingerprint calculation can still fail. Align this with rrdp_system__encryption_init() by assigning the return value of RSA::loadPublicKey(...) (or using the $public key object directly) and calling getFingerprint() on that key object.
| $rsa->loadPublicKey($rrdp_config['encryption']['public_key']); | |
| $rrdp_config['encryption']['public_key_fingerprint'] = $rsa->getFingerprint(); | |
| $public_key = $rsa->loadPublicKey($rrdp_config['encryption']['public_key']); | |
| $rrdp_config['encryption']['public_key_fingerprint'] = $public_key->getFingerprint(); |
$rsa->loadPulicKey($rrdp_config['encryption']['public_key']);
should be
$rsa->loadPublicKey($rrdp_config['encryption']['public_key']);