only check the filename suffix (don't permit the extension to be in the middle of the pathname) to avoid nonsensical values for pathnames such as foo.manager/bar.gbr
avoid the confusing additive logic that yielded nonsensical values for pathnames such as foo.gbr.cer
require .pem to be after the other suffix
use clear logic to make the function's behavior easier to understand
Also miscellaneous fixes/cleanups:
constify the parameter
Doxygenize the documentation
never return a negative error code (there's no need, and it makes it possible to convert the return type to an enum type in the future)
foo.manager/bar.gbr
foo.gbr.cer
.pem
to be after the other suffixAlso miscellaneous fixes/cleanups:
const
ify the parameterAddresses issue #31.