<matrixBuild _class='hudson.matrix.MatrixBuild'><action _class='hudson.model.CauseAction'><cause _class='hudson.triggers.SCMTrigger$SCMTriggerCause'><shortDescription>Started by an SCM change</shortDescription></cause></action><action></action><action _class='hudson.model.ParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>EMAIL_NOTIFICATIONS</name><value>jenkins-notifications@lists.osmocom.org laforge@gnumonks.org</value></parameter></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>90801</buildingDurationMillis><executingTimeMillis>90801</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>8404</waitingDurationMillis><waitingTimeMillis>8404</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmaster _class='hudson.plugins.git.util.Build'><buildNumber>7958</buildNumber><marked><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><branch><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><name>origin/master</name></branch></marked><revision><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><branch><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><name>origin/master</name></branch></revision></originmaster><refsremotesoriginmaster _class='hudson.plugins.git.util.Build'><buildNumber>4893</buildNumber><marked><SHA1>af54579bd49100c2d837044d7336d9df8377808f</SHA1><branch><SHA1>af54579bd49100c2d837044d7336d9df8377808f</SHA1><name>refs/remotes/origin/master</name></branch></marked><revision><SHA1>af54579bd49100c2d837044d7336d9df8377808f</SHA1><branch><SHA1>af54579bd49100c2d837044d7336d9df8377808f</SHA1><name>refs/remotes/origin/master</name></branch></revision></refsremotesoriginmaster></buildsByBranchName><lastBuiltRevision><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><branch><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><name>origin/master</name></branch></lastBuiltRevision><remoteUrl>https://gerrit.osmocom.org/osmo-pcap</remoteUrl><scmName></scmName></action><action></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#7958</displayName><duration>90801</duration><estimatedDuration>86039</estimatedDuration><fullDisplayName>master-osmo-pcap #7958</fullDisplayName><id>7958</id><inProgress>false</inProgress><keepLog>false</keepLog><number>7958</number><queueId>151623</queueId><result>SUCCESS</result><timestamp>1782293708808</timestamp><url>https://jenkins.osmocom.org/jenkins/job/master-osmo-pcap/7958/</url><builtOn></builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>include/osmo-pcap/osmo_tls.h</affectedPath><affectedPath>src/osmo_tls.c</affectedPath><commitId>603c1e44f9e751f6949fa43bc9ac9580235427c2</commitId><timestamp>1782202687000</timestamp><author><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></author><authorEmail>vyanitskiy@sysmocom.de</authorEmail><comment>tls: fix broken certificate hostname verification

verify_cert_cb() retrieved the gnutls session pointer and passed it to
gnutls_certificate_verify_peers3() as the expected hostname.  But the
session pointer is set to the osmo_tls_session struct (it is needed by
cert_callback()), not a hostname string.  Hostname matching was
therefore performed against raw struct bytes, rendering verification
meaningless and potentially reading out of bounds, even when
"tls verify-cert" was enabled.

Store the configured hostname in struct osmo_tls_session and have
verify_cert_cb() read it from there.  Also drop the stray
gnutls_certificate_verify_peers3() call in the client setup: it ran
before any handshake (so there were no peer certificates yet) and its
result was ignored; the real verification happens via the registered
callback during the handshake.

Change-Id: If64950a698bfcfbf556a37ef1be3e68abc124384
AI-Assisted: yes (Claude)
</comment><date>2026-06-23 08:18:07 +0000</date><id>603c1e44f9e751f6949fa43bc9ac9580235427c2</id><msg>tls: fix broken certificate hostname verification</msg><path><editType>edit</editType><file>include/osmo-pcap/osmo_tls.h</file></path><path><editType>edit</editType><file>src/osmo_tls.c</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit><run><number>7958</number><url>https://jenkins.osmocom.org/jenkins/job/master-osmo-pcap/a1=default,a2=default,a3=default,a4=default,label=osmocom-master/7958/</url></run></matrixBuild>