Hoernchen submitted this change.

View Change

Approvals: Jenkins Builder: Verified dexter: Looks good to me, but someone else must approve Hoernchen: Looks good to me, approved
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
---
M osmo-smdpp.py
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index 8120b0f..2add23f 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 \"%(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:

To view, visit change 43549. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2fa822c7d5e0d5b68a6704a1779f9923505f9008
Gerrit-Change-Number: 43549
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen <ewild@sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>