Skip to content

Commit 801ee38

Browse files
committed
5.0.12 release
1 parent d1851a7 commit 801ee38

14 files changed

+1241
-1050
lines changed

ChangeLog.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11

22
ChangeLog for jsrsasign
33

4+
* Changes between 5.0.11 to 5.0.12
5+
- jws between 3.3.3 to 3.3.4
6+
- support grace period for verifyJWT method.
7+
This is to allow time difference between
8+
JWT generator and verifier.
9+
- asn1hex
10+
- API document update
11+
412
* Changes between 5.0.10 to 5.0.11
513
- X509v1 certificate support in KEYUTIL.getKey and
614
X509.getPublicKeyInfoPropOfCertPEM

api/files.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ <h2><a href="symbols/src/jws-3.3.js.html">jws-3.3.js</a></h2>
649649

650650

651651
<dt class="heading">Version:</dt>
652-
<dd>3.3.3 (2015-Nov-27)</dd>
652+
<dd>3.3.4 (2016-May-17)</dd>
653653

654654

655655

api/symbols/ASN1HEX.html

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ <h1 class="classTitle">
448448
<div class="fixedFont">
449449
<b><a href="../symbols/ASN1HEX.html#constructor">ASN1HEX</a></b>()
450450
</div>
451-
<div class="description">ASN.1 DER encoded hexadecimal string utility class</div>
451+
<div class="description">ASN.1 DER encoded hexadecimal string utility class
452+
This class provides a parser for hexadecimal string of
453+
DER encoded ASN.1 binary data.</div>
452454
</td>
453455
</tr>
454456
</tbody>
@@ -633,6 +635,41 @@ <h1 class="classTitle">
633635

634636
<div class="description">
635637
ASN.1 DER encoded hexadecimal string utility class
638+
This class provides a parser for hexadecimal string of
639+
DER encoded ASN.1 binary data.
640+
Here are major methods of this class.
641+
<ul>
642+
<li><b>ACCESS BY POSITION</b>
643+
<ul>
644+
<li><a href="../symbols/ASN1HEX.html#.getHexOfTLV_AtObj">ASN1HEX.getHexOfTLV_AtObj</a> - get ASN.1 TLV at specified position</li>
645+
<li><a href="../symbols/ASN1HEX.html#.getHexOfV_AtObj">ASN1HEX.getHexOfV_AtObj</a> - get ASN.1 V at specified position</li>
646+
<li><a href="../symbols/ASN1HEX.html#.getHexOfL_AtObj">ASN1HEX.getHexOfL_AtObj</a> - get hexadecimal ASN.1 L at specified position</li>
647+
<li><a href="../symbols/ASN1HEX.html#.getIntOfL_AtObj">ASN1HEX.getIntOfL_AtObj</a> - get integer ASN.1 L at specified position</li>
648+
<li><a href="../symbols/ASN1HEX.html#.getStartPosOfV_AtObj">ASN1HEX.getStartPosOfV_AtObj</a> - get ASN.1 V position from its ASN.1 TLV position</li>
649+
</ul>
650+
</li>
651+
<li><b>ACCESS FOR CHILD ITEM</b>
652+
<ul>
653+
<li><a href="../symbols/ASN1HEX.html#.getNthChildIndex_AtObj">ASN1HEX.getNthChildIndex_AtObj</a> - get nth child index at specified position</li>
654+
<li><a href="../symbols/ASN1HEX.html#.getPosArrayOfChildren_AtObj">ASN1HEX.getPosArrayOfChildren_AtObj</a> - get indexes of children</li>
655+
<li><a href="../symbols/ASN1HEX.html#.getPosOfNextSibling_AtObj">ASN1HEX.getPosOfNextSibling_AtObj</a> - get position of next sibling</li>
656+
</ul>
657+
</li>
658+
<li><b>ACCESS NESTED ASN.1 STRUCTURE</b>
659+
<ul>
660+
<li><a href="../symbols/ASN1HEX.html#.getDecendantHexTLVByNthList">ASN1HEX.getDecendantHexTLVByNthList</a> - get ASN.1 TLV at specified list index</li>
661+
<li><a href="../symbols/ASN1HEX.html#.getDecendantHexVByNthList">ASN1HEX.getDecendantHexVByNthList</a> - get ASN.1 V at specified list index</li>
662+
<li><a href="../symbols/ASN1HEX.html#.getDecendantIndexByNthList">ASN1HEX.getDecendantIndexByNthList</a> - get index at specified list index</li>
663+
</ul>
664+
</li>
665+
<li><b>UTILITIES</b>
666+
<ul>
667+
<li><a href="../symbols/ASN1HEX.html#.dump">ASN1HEX.dump</a> - dump ASN.1 structure</li>
668+
<li><a href="../symbols/ASN1HEX.html#.isASN1HEX">ASN1HEX.isASN1HEX</a> - check whether ASN.1 hexadecimal string or not</li>
669+
<li><a href="../symbols/ASN1HEX.html#.hextooidstr">ASN1HEX.hextooidstr</a> - convert hexadecimal string of OID to dotted integer list</li>
670+
</ul>
671+
</li>
672+
</ul>
636673

637674
</div>
638675

@@ -700,16 +737,19 @@ <h1 class="classTitle">
700737
ASN1HEX.dump('0203012345')
701738
&darr;
702739
INTEGER 012345
740+
703741
// ASN.1 Object Identifier
704742
ASN1HEX.dump('06052b0e03021a')
705743
&darr;
706744
ObjectIdentifier sha1 (1 3 14 3 2 26)
745+
707746
// ASN.1 SEQUENCE
708747
ASN1HEX.dump('3006020101020102')
709748
&darr;
710749
SEQUENCE
711750
INTEGER 01
712751
INTEGER 02
752+
713753
// ASN.1 DUMP FOR X.509 CERTIFICATE
714754
ASN1HEX.dump(X509.pemToHex(certPEM))
715755
&darr;

api/symbols/KJUR.jws.JWS.html

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,11 +1518,22 @@ <h4>Supported Algorithms</h4>
15181518
the same as value if specified. (OPTION)</li>
15191519
<li>Time validity
15201520
<ul>
1521-
<li>If acceptField.verifyAt as number of UNIX origin time is specifed for validation time,
1522-
this method will verify at the time for it, otherwise current time will be used to verify.</li>
1523-
<li>Payload.exp (expire) - Validation time is smaller than Payloead.exp.</li>
1524-
<li>Payload.nbf (not before) - Validation time is greater than Payloead.nbf.</li>
1525-
<li>Payload.iat (issued at) - Validation time is greater than Payloead.iat.</li>
1521+
<li>
1522+
If acceptField.verifyAt as number of UNIX origin time is specifed for validation time,
1523+
this method will verify at the time for it, otherwise current time will be used to verify.
1524+
</li>
1525+
<li>
1526+
Clock of JWT generator or verifier can be fast or slow. If these clocks are
1527+
very different, JWT validation may fail. To avoid such case, 'jsrsasign' supports
1528+
'acceptField.gracePeriod' parameter which specifies acceptable time difference
1529+
of those clocks in seconds. So if you want to accept slow or fast in 2 hours,
1530+
you can specify <code>acceptField.gracePeriod = 2 * 60 * 60;</code>.
1531+
"gracePeriod" is zero by default.
1532+
"gracePeriod" is supported since jsrsasign 5.0.12.
1533+
</li>
1534+
<li>Payload.exp (expire) - Validation time is smaller than Payload.exp + gracePeriod.</li>
1535+
<li>Payload.nbf (not before) - Validation time is greater than Payload.nbf - gracePeriod.</li>
1536+
<li>Payload.iat (issued at) - Validation time is greater than Payload.iat - gracePeriod.</li>
15261537
</ul>
15271538
</li>
15281539
<li>Payload.jti (JWT id) - Payload.jti is included in acceptField.jti if specified. (OPTION)</li>
@@ -1545,7 +1556,8 @@ <h4>Supported Algorithms</h4>
15451556
sub: ['mailto:[email protected]', 'mailto:[email protected]'],
15461557
verifyAt: KJUR.jws.IntDate.get('20150520235959Z'),
15471558
aud: ['http://foo.com'], // aud: 'http://foo.com' is fine too.
1548-
jti: 'id123456'
1559+
jti: 'id123456',
1560+
gracePeriod: 1 * 60 * 60 // accept 1 hour slow or fast
15491561
});</pre>
15501562

15511563

0 commit comments

Comments
 (0)