# SSL::payload replace - silent failure?

**URL:** <https://community.f5.com/t/ssl-payload-replace-silent-failure/69193>\
**Category:** Technical Forums\
**Tags:** event\
**Created:** [February 4, 2022, 8:32pm UTC](https://community.f5.com/t/ssl-payload-replace-silent-failure/69193 "2022-02-04T20:32:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darin\_DeFer](https://avatars.discourse-cdn.com/v4/letter/d/7ba0ec/32.png) [@Darin\_DeFer](https://community.f5.com/u/Darin_DeFer)\
**Post date:** [February 4, 2022, 8:32pm UTC](https://community.f5.com/t/ssl-payload-replace-silent-failure/69193/1 "2022-02-04T20:32:11Z")

</div>

We have a request to add a certificate common name (CN) string to the end of a particular type of ISO-8583 message request coming arcoss on a long-lived TCP connection.&nbsp; We already extract and log elements of the message payload today…no problem.&nbsp; We created a new iRule to detect the particular message type and append the trailing CN string…again no problem.

When we try to replace the payload our iRule fails silently…problem.

The syntax is pretty basic, I don’t think we’re fudging it up.&nbsp; Anything we can do to debug WHY this particular line in our iRule is failing?

[SSL::payload] replace 0 $data\_len $new\_payload;

- We know that new\_payload is good and contains the value we want.
- We have data\_len set using:&nbsp; set data\_len [SSL::payload length]

Have tried using “[SSL::payload]” and “SSL::payload” on the chance that the square brackets were issue.&nbsp; No joy.

---

<div class="post-metadata">

**Author:** ![jaikumar\_f5](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jaikumar\_f5](https://community.f5.com/u/jaikumar_f5)\
**Post date:** [February 5, 2022, 3:51am UTC](https://community.f5.com/t/ssl-payload-replace-silent-failure/69193/2 "2022-02-05T03:51:45Z")

</div>

Can you try something like this,

SSL::payload replace 0 $data\_len “”

SSL::payload replace 0 0 $new\_payload

---

<div class="post-metadata">

**Author:** ![Darin\_DeFer](https://avatars.discourse-cdn.com/v4/letter/d/7ba0ec/32.png) [@Darin\_DeFer](https://community.f5.com/u/Darin_DeFer)\
**Post date:** [February 7, 2022, 4:59pm UTC](https://community.f5.com/t/ssl-payload-replace-silent-failure/69193/3 "2022-02-07T16:59:47Z")

</div>

That was it.&nbsp; I \*thought\* we’d tried it without the enclosing square brackets bit clearly NOT!

Many thanks!
