A method for an authentication procedure in accessing an access network, wherein a user equipment accesses a visited or home network (110/ 115) via a security gateway (120/125), the method comprising the steps of: - the user equipment and the security gateway (120/125) exchanging information on available certificate(s); - identifying a mismatch of certificates between the user equipment and the security gateway (120/125), the mismatch impeding the attempted authentication of the security gateway (120/125); and - engaging a certificate server, the certificate server assisting in at least part of the authentication procedure, wherein the certificate server assists in part of the authentication by providing at least one certificate so that the security gateway (120/125) and the user equipment have at least one matching certificate; the method characterised by the steps of: - the user equipment providing the security gateway (120/125) with an indication of its available root certificate or certificates; - the security gateway (120/125) comparing the indication of available root certificate or certificates from the user equipment with stored certificates; - if the security gateway (120/125) could not find a stored certificate matching the indicated root certificate or certificates, the security gateway (120/125) requesting a matching certificate from the certificate server; - the certificate server generating a matching certificate and associated key pair; - the certificate server sending the matching certificate and its associated key pair to the security gateway (120/125); - the security gateway (120/125) sending the matching certificate to the user equipment; and - the user equipment validating the received certificate. - the user equipment and the security gateway (120/125) exchanging information on available certificate(s); - identifying a mismatch of certificates between the user equipment and the security gateway (120/125), the mismatch impeding the attempted authentication of the security gateway (120/125); and - engaging a certificate server, the certificate server assisting in at least part of the authentication procedure, wherein the certificate server assists in part of the authentication by providing at least one certificate so that the security gateway (120/125) and the user equipment have at least one matching certificate; the method characterised by the steps of: - the user equipment providing the security gateway (120/125) with an indication of its available root certificate or certificates; - the security gateway (120/125) comparing the indication of available root certificate or certificates from the user equipment with stored certificates; - if the security gateway (120/125) could not find a stored certificate matching the indicated root certificate or certificates, the security gateway (120/125) requesting a matching certificate from the certificate server; - the certificate server generating a matching certificate and associated key pair; - the certificate server sending the matching certificate and its associated key pair to the security gateway (120/125); - the security gateway (120/125) sending the matching certificate to the user equipment; and - the user equipment validating the received certificate.