mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-09-28 15:06:33 +03:00
osmo-smdpp: add --smdp-address to set ES9+ SM-DP+ address
The ES9+ SM-DP+ address is used for the smdpAddress check and for serverSigned1.serverAddress, both default to HOSTNAME. Add --smdp-address (default: HOSTNAME) so the advertised address can carry a port and still match what the LPA connects to when the TLS endpoint is bound to other ports than 443. TLS certificate identity is unaffected, this is only the ES9+ address. SGP.22 defines both smdpAddress and serverSigned1.serverAddress as an FQDN. Taken strictly that leaves no way to run an SM-DP+ on a port other than 443, so an address with a port is arguably outside the spec but needed for testing. Change-Id: I2fa822c7d5e0d5b68a6704a1779f9923505f9008
This commit is contained in:
+6
-1
@@ -916,12 +916,17 @@ def main(argv):
|
||||
action='store_true', default=False)
|
||||
parser.add_argument("-m", "--in-memory", help="Use ephermal in-memory session storage (for concurrent runs)",
|
||||
action='store_true', default=False)
|
||||
parser.add_argument("--smdp-address", default=HOSTNAME,
|
||||
help="ES9+ SM-DP+ address advertised, defaults to \"%(default)s\". "
|
||||
"Include the TLS port (e.g. %(default)s:8443) when binding a port other "
|
||||
"than 443, so it matches the address the LPA connects to. "
|
||||
"The TLS certificate identity is unaffected.")
|
||||
args = parser.parse_args()
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG if args.verbose else logging.WARNING)
|
||||
|
||||
common_cert_path = os.path.join(DATA_DIR, args.certdir)
|
||||
hs = SmDppHttpServer(server_hostname=HOSTNAME, ci_certs_path=os.path.join(common_cert_path, 'CertificateIssuer'), common_cert_path=common_cert_path, use_brainpool=args.brainpool)
|
||||
hs = SmDppHttpServer(server_hostname=args.smdp_address, ci_certs_path=os.path.join(common_cert_path, 'CertificateIssuer'), common_cert_path=common_cert_path, use_brainpool=args.brainpool)
|
||||
if(args.nossl):
|
||||
hs.app.run(args.host, args.port)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user