<p></p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/henningw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/henningw">@henningw</a> <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/miconda/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/miconda">@miconda</a> indeed, the full raw PEM-encoded certificate is not currently available via an existing PV.</p>
<p>Thinking through this a little bit more, would you prefer a full certificate access mechanism via something like $tls_peer_raw_cert{s.urlencode.param} instead?</p>
<p>Just to explain where I was coming from, nginx has deprecated access to the raw PEM-encoded certificate, encouraging users to use a new urlescaped cert mechanism instead:</p>
<p><a href="http://nginx.org/en/docs/http/ngx_http_ssl_module.html" rel="nofollow">http://nginx.org/en/docs/http/ngx_http_ssl_module.html</a></p>
<p>It is that avenue of thinking that I created this PR for accessing and urlencoding the URL cert with one PV.  In retrospect, nginx's urlencoding of the certificate is probably rooted in use cases that involve wrapping the cert in a header and passing it off to a different system for processing.  I did not consider use of the raw PEM-encoded certificate in a kemi-enabled scenario, where $tls_peer_escaped_cert would need to be urldecoded before being asn1parsed (or even re-encoded with some other encoding scheme in pv_trans.c...).</p>
<p>I'll create $tls_peer_raw_cert as a separate PR, since that seems simpler.  Does this plan sound good to you?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2268#issuecomment-606802985">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKKXNYPOUTYQZK2CMLRKI2QTANCNFSM4LXFGGCA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZPNE2N3BFII6UHUSPLRKI2QTA5CNFSM4LXFGGCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEQVRIKI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2268#issuecomment-606802985",
"url": "https://github.com/kamailio/kamailio/pull/2268#issuecomment-606802985",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>