Skip to content

Commit 08976d0

Browse files
committed
SDK-1019: Add comment for casting
1 parent 6b6b6cc commit 08976d0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Yoti/Util/Profile/AnchorConverter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,14 @@ private static function convertCertToX509($certificate)
161161
$X509 = new X509();
162162
$X509Data = $X509->loadX509($certificate);
163163
$decodedX509Data = json_decode(json_encode($X509Data), false);
164+
165+
// Ensure serial number is cast to string.
166+
// @see \phpseclib\Math\BigInteger::__toString()
164167
$decodedX509Data
165168
->tbsCertificate
166169
->serialNumber
167170
->value = (string) $X509Data['tbsCertificate']['serialNumber'];
171+
168172
return $decodedX509Data;
169173
}
170174

0 commit comments

Comments
 (0)