Support directories with "." in x509_load_serial()
authorAna María Martínez Gómez <ammartinez@suse.de>
Fri, 22 Jun 2018 22:01:17 +0000 (00:01 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Sun, 24 Jun 2018 13:42:28 +0000 (15:42 +0200)
commitf223e8fd1c89d0e47e2acafe14d7f3a4e8a05742
tree8ad1320043fc84f2dcd507e292ff5fcf8ac8a0bd
parenteaf39a9fe6f55feb5251e235069e02f7f50d9a49
Support directories with "." in x509_load_serial()

Use `strrchr` to get a pointer to the last occurrence of `.` in the
path string, instead of the first one with `strchr`.  This prevent the
path to be wrongly split if it contains several `.`, and not only the
one for the extension.

Fixes https://github.com/openssl/openssl/issues/6489.

CLA: trivial

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/6566)
apps/x509.c