<matrixBuild _class='hudson.matrix.MatrixBuild'><action _class='hudson.model.CauseAction'><cause _class='org.jenkinsci.plugins.workflow.support.steps.build.BuildUpstreamCause'><shortDescription>Started by upstream project "gerrit-osmo-pcap" build number 261</shortDescription><upstreamBuild>261</upstreamBuild><upstreamProject>gerrit-osmo-pcap</upstreamProject><upstreamUrl>job/gerrit-osmo-pcap/</upstreamUrl></cause></action><action></action><action _class='hudson.model.ParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>COMMENT_TYPE</name><value></value></parameter><parameter _class='hudson.model.StringParameterValue'><name>DISTRO</name><value></value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_CHANGE_NUMBER</name><value>42849</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_HOST</name><value>gerrit.osmocom.org</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PATCHSET_NUMBER</name><value>4</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PATCHSET_REVISION</name><value>603c1e44f9e751f6949fa43bc9ac9580235427c2</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PATCHSET_UPLOADER_NAME</name><value>fixeria</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PORT</name><value>29418</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PROJECT</name><value>osmo-pcap</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_REFSPEC</name><value>refs/changes/49/42849/4</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_REPO_URL</name><value>ssh://jenkins@gerrit.osmocom.org:29418/osmo-pcap</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>PIPELINE_BUILD_URL</name><value>https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcap/261/</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>PROJECT_NAME</name><value>osmo-pcap</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>BRANCH_CI</name><value>master</value></parameter></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>0</buildableDurationMillis><buildableTimeMillis>0</buildableTimeMillis><buildingDurationMillis>101163</buildingDurationMillis><executingTimeMillis>101163</executingTimeMillis><executorUtilization>1.0</executorUtilization><queuingDurationMillis>6637</queuingDurationMillis><queuingTimeMillis>6637</queuingTimeMillis><subTaskCount>0</subTaskCount><totalDurationMillis>107800</totalDurationMillis><waitingDurationMillis>6496</waitingDurationMillis><waitingTimeMillis>6496</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><master _class='hudson.plugins.git.util.Build'><buildNumber>261</buildNumber><marked><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><branch><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><name>master</name></branch></marked><revision><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><branch><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><name>master</name></branch></revision></master></buildsByBranchName><lastBuiltRevision><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><branch><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><name>master</name></branch></lastBuiltRevision><remoteUrl>ssh://jenkins@gerrit.osmocom.org:29418/osmo-pcap</remoteUrl><scmName></scmName></action><action></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'><artifactsUrl>https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcap-build/lastStableBuild/artifact</artifactsUrl><changesUrl>https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcap-build/changes</changesUrl><displayUrl>https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcap-build/lastStableBuild/</displayUrl><testsUrl>https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcap-build/lastStableBuild/testReport</testsUrl></action><building>false</building><displayName>#261</displayName><duration>101163</duration><estimatedDuration>101162</estimatedDuration><fullDisplayName>gerrit-osmo-pcap-build #261</fullDisplayName><id>261</id><inProgress>false</inProgress><keepLog>false</keepLog><number>261</number><queueId>150491</queueId><result>SUCCESS</result><timestamp>1782202718386</timestamp><url>https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcap-build/261/</url><builtOn></builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/osmo_tls.c</affectedPath><affectedPath>include/osmo-pcap/osmo_tls.h</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>src/osmo_tls.c</file></path><path><editType>edit</editType><file>include/osmo-pcap/osmo_tls.h</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><description></description><fullName>Vadim Yanitskiy</fullName><id>fixeria</id></culprit><run><action _class='hudson.matrix.MatrixChildParametersAction'><parameter _class='hudson.model.StringParameterValue'><name>COMMENT_TYPE</name><value></value></parameter><parameter _class='hudson.model.StringParameterValue'><name>DISTRO</name><value></value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_BRANCH</name><value>master</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_CHANGE_NUMBER</name><value>42849</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_HOST</name><value>gerrit.osmocom.org</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PATCHSET_NUMBER</name><value>4</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PATCHSET_REVISION</name><value>603c1e44f9e751f6949fa43bc9ac9580235427c2</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PATCHSET_UPLOADER_NAME</name><value>fixeria</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PORT</name><value>29418</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_PROJECT</name><value>osmo-pcap</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_REFSPEC</name><value>refs/changes/49/42849/4</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>GERRIT_REPO_URL</name><value>ssh://jenkins@gerrit.osmocom.org:29418/osmo-pcap</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>PIPELINE_BUILD_URL</name><value>https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcap/261/</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>PROJECT_NAME</name><value>osmo-pcap</value></parameter><parameter _class='hudson.model.StringParameterValue'><name>BRANCH_CI</name><value>master</value></parameter></action><action></action><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "gerrit-osmo-pcap-build" build number 261</shortDescription><upstreamBuild>261</upstreamBuild><upstreamProject>gerrit-osmo-pcap-build</upstreamProject><upstreamUrl>job/gerrit-osmo-pcap-build/</upstreamUrl></cause></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>39238</buildableDurationMillis><buildableTimeMillis>39238</buildableTimeMillis><buildingDurationMillis>60577</buildingDurationMillis><executingTimeMillis>60577</executingTimeMillis><executorUtilization>1.0</executorUtilization><subTaskCount>0</subTaskCount><waitingDurationMillis>0</waitingDurationMillis><waitingTimeMillis>0</waitingTimeMillis></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><master _class='hudson.plugins.git.util.Build'><buildNumber>261</buildNumber><marked><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><branch><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><name>master</name></branch></marked><revision><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><branch><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><name>master</name></branch></revision></master></buildsByBranchName><lastBuiltRevision><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><branch><SHA1>603c1e44f9e751f6949fa43bc9ac9580235427c2</SHA1><name>master</name></branch></lastBuiltRevision><remoteUrl>ssh://jenkins@gerrit.osmocom.org:29418/osmo-pcap</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><displayName>#261</displayName><duration>60577</duration><estimatedDuration>61255</estimatedDuration><fullDisplayName>gerrit-osmo-pcap-build » a1=default,a2=default,a3=default,a4=default,osmocom-gerrit #261</fullDisplayName><id>261</id><inProgress>false</inProgress><keepLog>false</keepLog><number>261</number><queueId>150492</queueId><result>SUCCESS</result><timestamp>1782202718386</timestamp><url>https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-pcap-build/a1=default,a2=default,a3=default,a4=default,label=osmocom-gerrit/261/</url><builtOn>build4-deb12build-ansible</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>src/osmo_tls.c</affectedPath><affectedPath>include/osmo-pcap/osmo_tls.h</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>src/osmo_tls.c</file></path><path><editType>edit</editType><file>include/osmo-pcap/osmo_tls.h</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.osmocom.org/jenkins/user/fixeria</absoluteUrl><fullName>Vadim Yanitskiy</fullName></culprit></run></matrixBuild>