Generate Syncthing Device ID from the certificate

I did not find an easy way to do it, so I wrote a short python script from the description of the device ID in the documentation.

I figured it could be useful, so I’m sharing it here:

I use it for generating config.xml from a directory of certificates in my ansible scripts. I tested it with a few device ids, but I’d be even more confident if someone ran it on a few more.

1 Like

It looks correct to me, just by eyeballing it. :slight_smile: If it does the right thing for one certificate / device ID it probably does so for all of them.

This works for me.

What does that do, st-ddns?

Don’t mind the silly name; it just announces a given cert and/or queries a given device id.