mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-22 15:00:07 +01:00
keyfile should become our main import/export format. It is desirable, that a keyfile can contain every aspect of a connection. For blob certificates, the writer in core daemon would always write them to a file and convert the scheme to path. This behavior is not great for a (hyptetical) `nmcli connection export` command because it would have to export them somehow outside of keyfile, e.g. by writing them to temporary files. Instead, if the write handler does not handle a certificate, use a default implementation in nm_keyfile_write() which adds the blob inside the keyfile. Interestingly, keyfile reader already supported reading certificate blobs. But this legacy format accepts the blob as arbitrary binary without marking the format and without scheme prefix. Instead of writing the binary data directly, write it with a new uri scheme "data:;base64," and encode it in base64. Also go through some lengths to make sure that whatever path keyfile plugin writes, can be read back again. That is, because keyfile writer preferably writes relative paths without prefix. Add nm_keyfile_detect_unqualified_path_scheme() to encapsulate the detection of pathnames without file:// prefix and use it to check whether the path name must be fully qualified. |
||
|---|---|---|
| .. | ||
| ca-no-ending-newline.pem | ||
| pkcs8-decrypted.der | ||
| pkcs8-enc-key.pem | ||
| pkcs8-noenc-key.pem | ||
| test-aes-key.pem | ||
| test-ca-cert.pem | ||
| test-cert.p12 | ||
| test-key-and-cert.pem | ||
| test-key-only-decrypted.der | ||
| test-key-only-decrypted.pem | ||
| test-key-only.pem | ||
| test2-cert.p12 | ||
| test2_ca_cert.pem | ||
| test2_key_and_cert.pem | ||
| test_ca_cert.der | ||
| test_ca_cert.pem | ||
| test_key_and_cert.pem | ||