A method for updating and using a digital certificate, applied in establishing Ad hoc network communication between two terminals, the method comprising: a first terminal with wireless local area network, WLAN, Authentication and Privacy Infrastructure, WAPI, function sending a beacon probe frame to a second terminal with WAPI function; after receiving the beacon probe frame from said first terminal, said second terminal sending a beacon probe response frame including digital certificate format information of said second terminal; after receiving the beacon probe response frame, said first terminal checking whether a digital certificate format of said second terminal is the same as a digital certificate format of said first terminal, if not, said first terminal establishing a secure link with an access point; said first terminal using said secure link to send a certificate updating request to said access point, where said certificate updating request includes a digital certificate to be updated which is currently used by said first terminal; and said access point sending said digital certificate to be updated to a local Authentication Service Unit which issues the certificate to be updated; and the local Authentication Service Unit which issues said digital certificate to be updated verifying said digital certificate to be updated, and after said digital certificate is verified to be valid, a local Authentication Service Unit corresponding to said access point generating a new digital certificate of said first terminal, and sending said new digital certificate to said first terminal through said access point (304, 305); wherein the local Authentication Service Unit which issues said digital certificate to be updated and the local Authentication Service Unit corresponding to said access point are different local Authentication Service Units. a first terminal with wireless local area network, WLAN, Authentication and Privacy Infrastructure, WAPI, function sending a beacon probe frame to a second terminal with WAPI function; after receiving the beacon probe frame from said first terminal, said second terminal sending a beacon probe response frame including digital certificate format information of said second terminal; after receiving the beacon probe response frame, said first terminal checking whether a digital certificate format of said second terminal is the same as a digital certificate format of said first terminal, if not, said first terminal establishing a secure link with an access point; said first terminal using said secure link to send a certificate updating request to said access point, where said certificate updating request includes a digital certificate to be updated which is currently used by said first terminal; and said access point sending said digital certificate to be updated to a local Authentication Service Unit which issues the certificate to be updated; and the local Authentication Service Unit which issues said digital certificate to be updated verifying said digital certificate to be updated, and after said digital certificate is verified to be valid, a local Authentication Service Unit corresponding to said access point generating a new digital certificate of said first terminal, and sending said new digital certificate to said first terminal through said access point (304, 305); wherein the local Authentication Service Unit which issues said digital certificate to be updated and the local Authentication Service Unit corresponding to said access point are different local Authentication Service Units.