Skip to content

Commit fa0a764

Browse files
committed
- QZNMA: improved error message for public key loading
- OSNMA: added reference
1 parent 491902c commit fa0a764

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/cssrlib/osnma.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
[1] Galileo Open Service Navigation Message Authentication (OSNMA)
55
Signal-in-Space Interface Control Document (SIS ICD), October, 2023.
66
7+
[2] Galileo Open Service Navigation Message Authentication (OSNMA)
8+
Receiver Guidelines Issue 1.3, January, 2024.
9+
710
Note:
811
to use the package for OSNMA, the user needs to
912
install the public keys provided by EUSPA.

src/cssrlib/qznma.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ def verify_gnss_nav(self, npr, mnav):
572572
if self.pk is None:
573573
pubk_path = self.pubk_bdir + f"/{npr.keyid:03d}.der"
574574
self.pk = load_pubkey(pubk_path)
575+
if self.pk is None:
576+
if self.monlevel > 0:
577+
print(f"loading public key {npr.keyid} was faild.")
578+
return False
575579

576580
ds_der = raw2der(npr.ds)
577581
status = False
@@ -762,6 +766,10 @@ def verify_qzss_nav(self, sat, npr, msg, mode):
762766
if self.pk is None:
763767
pubk_path = self.pubk_bdir + f"/{npr.keyid:03d}.der"
764768
self.pk = load_pubkey(pubk_path)
769+
if self.pk is None:
770+
if self.monlevel > 0:
771+
print(f"loading public key {npr.keyid} was faild.")
772+
return False
765773

766774
status = False
767775
try:

0 commit comments

Comments
 (0)