The location service request includes action indication information, the digital signature data, and the second counter value.
In non-roaming scenarios, a GMLC directly sends the location service request to the AMF. Correspondingly, the AMF receives the location service request from the GMLC. The location service request includes action indication information, the digital signature data, and the second counter value.
Step S407: The AMF determines whether the digital signature data matches the action indication information.
The AMF determines, based on a public key of the UDM and the second counter value, whether the digital signature data matches the action indication information, that is, de-signs the digital signature data by using the public key of the UDM and the second counter value. If first location privacy setting data obtained through de-signing matches a location service operation indicated by the action indication information, the digital signature data matches the action indication information, and the action indication information delivered by the GMLC is not maliciously modified. If the digital signature data does not match the action indication information, it indicates that the action indication information delivered by the GMLC is maliciously modified.
The AMF may obtain the public key of the UDM. For example, when obtaining the first location privacy setting data from the UDM, the AMF may obtain the public key of the UDM. A specific manner in which the AMF obtains the public key of the UDM is not limited in this embodiment of this application.
Step S408: If the UE is in an idle mode, the AMF triggers a network side service request to the UE.