Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/43549?usp=email )
Change subject: osmo-smdpp: add --smdp-address to set ES9+ SM-DP+ address ......................................................................
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, so this is useful for debugging, but likely not spec compliant.
Change-Id: I2fa822c7d5e0d5b68a6704a1779f9923505f9008 --- M osmo-smdpp.py 1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/43549/1
diff --git a/osmo-smdpp.py b/osmo-smdpp.py index 8120b0f..cf26e74 100755 --- a/osmo-smdpp.py +++ b/osmo-smdpp.py @@ -916,12 +916,17 @@ 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 HOSTNAME (%(default)s)." \ + "Set this to include the TLS port (e.g. testsmdpplus1.example.com:8443)" \ + "when binding a non-443 port, so it matches the address the LPA connects to." \ + "The TLS cert identity is unaffected. Useful for debugging.") 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: