Skip to content

Sanitize certificate subject name before comparing to deviceId

Andy Holmes requested to merge work/andyholmes/cert-compare into master

Summary

The device ID is sanitized to make it safe for D-Bus, so the device ID stored in the certificate as the subject name also needs to be sanitized before comparison.

Test Plan

Before:

A certificate with an unsanitized UUID (i.e. with hyphens) as the subject name will not match the sanitized device ID from and identity packet and the device link rejected.

After:

This should only affect 3rd-party clients, since kdeconnect-kde already sanitizes UUIDs, and kdeconnect-android doesn't use a UUIDv4, so never contained hyphens.

Merge request reports