|
978 | 978 | };
|
979 | 979 | pre>
|
980 | 980 | <p>
|
981 |
| - <a>PushMessageDataa> objects have an associated <dfn>bytesdfn> (a [=byte sequence=]), |
| 981 | + {{PushMessageData}} objects have an associated <dfn>bytesdfn> (a [=byte sequence=]), |
982 | 982 | which is set on creation.
|
983 | 983 | p>
|
984 | 984 | <p>
|
|
1123 | 1123 | li>
|
1124 | 1124 | <li>Let |subscription| be the active <a>push subscriptiona> for |registration|.
|
1125 | 1125 | li>
|
1126 |
| - <li>Initialize |data| to a value of `null`. |
| 1126 | + <li>Let |bytes| be null. |
1127 | 1127 | li>
|
1128 |
| - <li>If the <a>push messagea> contains a payload, perform the following steps: |
| 1128 | + <li>If the <a>push messagea> contains a payload: |
1129 | 1129 | <ol>
|
1130 |
| - <li>Decrypt the <a>push messagea> using the private key from the key pair |
1131 |
| - associated with |subscription| and the process described in [[RFC8291]]. This |
1132 |
| - produces the plain text of the message. |
| 1130 | + <li>Decrypt the <a>push messagea> payload using the private key from the key pair |
| 1131 | + associated with |subscription| and the process described in [[RFC8291]]. Set |bytes| |
| 1132 | + to the resulting [=/byte sequence=]. |
1133 | 1133 | li>
|
1134 |
| - <li>If the <a>push messagea> could not be decrypted for any reason, perform the |
1135 |
| - following steps: |
| 1134 | + <li>If the <a>push messagea> payload could not be decrypted for any reason: |
1136 | 1135 | <ol>
|
1137 | 1136 | <li>Acknowledge the receipt of the <a>push messagea> according to [[RFC8030]].
|
1138 | 1137 | Though the message was not successfully received and processed, this prevents the
|
1139 | 1138 | push service from attempting to retransmit the message; a badly encrypted message
|
1140 | 1139 | is not recoverable.
|
1141 | 1140 | li>
|
1142 |
| - <li>Discard the <a>push messagea>. |
| 1141 | + <li>Abort these steps. |
1143 | 1142 | li>
|
1144 |
| - <li>Terminate this process. |
1145 |
| - li> |
1146 |
| - ol>A `push` event MUST NOT be fired for a <a>push messagea> that was not |
1147 |
| - successfully decrypted using the key pair associated with the <a>push |
1148 |
| - subscriptiona>. |
1149 |
| - li> |
1150 |
| - <li>Let |data| be a new <a>PushMessageDataa> instance with the decrypted plain text |
1151 |
| - of the <a>push messagea>. |
| 1143 | + ol> |
| 1144 | + <p class="note"> |
| 1145 | + A `push` event will not be fired for a <a>push messagea> that was not |
| 1146 | + successfully decrypted using the key pair associated with the <a>push |
| 1147 | + subscriptiona>. |
| 1148 | + p> |
1152 | 1149 | li>
|
1153 | 1150 | ol>
|
1154 | 1151 | li>
|
|
1162 | 1159 | `data`
|
1163 | 1160 | dt>
|
1164 | 1161 | <dd>
|
1165 |
| - |data| |
| 1162 | + A new {{PushMessageData}} object whose [=bytes=] is |bytes|. |
1166 | 1163 | dd>
|
1167 | 1164 | dl>
|
1168 | 1165 | <p>
|
|
0 commit comments