Merge "Fix parsing certificate with fallback to PEM." into sc-dev