Skip to content

Commit

Permalink
- QZNMA: improved error message for public key loading
Browse files Browse the repository at this point in the history
- OSNMA: added reference
  • Loading branch information
hirokawa committed Jan 3, 2025
1 parent 491902c commit fa0a764
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cssrlib/osnma.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
[1] Galileo Open Service Navigation Message Authentication (OSNMA)
Signal-in-Space Interface Control Document (SIS ICD), October, 2023.
[2] Galileo Open Service Navigation Message Authentication (OSNMA)
Receiver Guidelines Issue 1.3, January, 2024.
Note:
to use the package for OSNMA, the user needs to
install the public keys provided by EUSPA.
Expand Down
8 changes: 8 additions & 0 deletions src/cssrlib/qznma.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,10 @@ def verify_gnss_nav(self, npr, mnav):
if self.pk is None:
pubk_path = self.pubk_bdir + f"/{npr.keyid:03d}.der"
self.pk = load_pubkey(pubk_path)
if self.pk is None:
if self.monlevel > 0:
print(f"loading public key {npr.keyid} was faild.")
return False

ds_der = raw2der(npr.ds)
status = False
Expand Down Expand Up @@ -762,6 +766,10 @@ def verify_qzss_nav(self, sat, npr, msg, mode):
if self.pk is None:
pubk_path = self.pubk_bdir + f"/{npr.keyid:03d}.der"
self.pk = load_pubkey(pubk_path)
if self.pk is None:
if self.monlevel > 0:
print(f"loading public key {npr.keyid} was faild.")
return False

status = False
try:
Expand Down

0 comments on commit fa0a764

Please sign in to comment.