Wrong file name of exported certificates

When I export an certificate, then the file-name settings are modified automatic :frowning:

/certificate/export-certificate type=pem "foo" file-name="sd1/foo.pem"

For this I expect an file named sd1/foo.pem, but I get sd1/foo.pem.crt instead.

I’m using RouterOS 7.16.1

Have anyone seeing this also?

Thanks

Yes, some commands add file extension automatically. But you could try:

/certificate/export-certificate type=pem "foo" file-name="sd1/foo.pem\00"

Yes this will works, but this looks like an bug for me. Or?

No it is not. At least I see it as a feature hand hope it never changes. A null terminator is the byte that signals the end of a string. If you add something behind that terminator (file extension) it ends up in nowhere land and is never used.