Sync M.S.X.X509Certificate with master (3.0) to fix bug #12303 and #11703