3.8.2 (Supreme 0.3.2)
- Less destructive Hotfix for for KT-71650
- Re-enables export of
Asn1Element.Tag
class to ObjC.
3.8.1 (Supreme 0.3.1)
- Hotfix for KT-71650
- Disables export of
Asn1Element.Tag
class to ObjC. Signum remains usable for KMP projects,
the Tag class just cannot be directly accessed from Swift and ObjC any more.
3.8.0 (Supreme 0.3.0) Breaking Changes Ahead!
- Completely revamped ASN.1 Tag Handling
- Properly handle multi-byte tags
- Introduce a new data structure
TLV.Tag
with an accompanyingTagClass
enum and aconstructed
flag to accurately represent arbitrary tags up toULong.MAX_VALUE
- Make all
tag
parametersULong
to reflect support for multi-byte tags - Remove
DERTags
- Revamp implicit tagging (there is still work to be done, but at least it supports CONSTRUCTED ASN.1 elements)
- Refactor
Int.Companion.decodeFromDer
->Int.Companion.decodeFromDerValue()
- Refactor
Long.Companion.decodeFromDer
->Long.Companion.decodeFromDerValue()
- Introduce
ULong.Companion.decodeFromDer
which can handle overlong inputs, as long as they start with a valid ULong encoding - Changed return type of
Verifier::verify
fromKmmResult<Unit>
toKmmResult<Success>
. Usage is unchanged. - Add
ConfirmationClaim
to represent Proof-of-Possesion Key Semantics for JWTs - Add claims to
JsonWebToken
to implement Demonstrating Proof of Possession - Replace
JsonWebToken.confirmationKey
byJsonWebToken.confirmationClaim
, the implementation was wrong - Introduce
ULong.toAsn1VarInt()
to encode ULongs into ASN.1 unsigned VarInts (not to be confused with
multi^2_base'sUVarInt
!) - Introduce
decodeAsn1VarULong()
anddecodeAsn1VarUInt()
which can handle overlong inputs, as long as they start with a valid unsigned number encoding.- Comes in three ULong flavours:
Iterator<Byte>.decodeAsn1VarULong()
Iterable<Byte>.decodeAsn1VarULong()
ByteArray.decodeAsn1VarULong()
- and three UInt flavours:
Iterator<Byte>.decodeAsn1VarUInt()
Iterable<Byte>.decodeAsn1VarUInt()
ByteArray.decodeAsn1VarUInt()
- Comes in three ULong flavours:
- Revamp implicit tagging
- Revamp
Asn1Element.parse()
, introducing new variants. This yields:Asn1Element.parse()
with the same semantics as beforeAsn1Element.parse()
alternative introduced, which takes aByteIterator
instead of aByteArray
Asn1Element.parseAll()
introduced, which consumes all bytes and returns a list of all ASN.1 elements (if parsing works)- Variant 1 takes a
ByteIterator
- Variant 2 takes a
ByteArray
- Variant 1 takes a
Asn1Element.parseFirst()
introduced, which tries to only parse a single ASN.1 element from the input and leaves the rest untouched.- Variant 1 takes a
ByteIterator
and returns the element; theByteIterator
is advanced accordingly - Variant 2 takes a
ByteArray
and returns aPair
of(element, remainingBytes)
- Variant 1 takes a
- More consistent low-level encoding and decoding function names:
encodeToAsn1Primitive
to produce anAsn1Primitive
that can directly be DER-encodedencodeToAsn1ContentBytes
to produce the content bytes of a TLV primitive (the V in TLV)decodeToXXX
to be invoked on anAsn1Primitive
to decode a DER-encoded primitive into the target typedecodeFromAsn1ContentBytes
to be invoked on the companion of the target type to decode the content bytes of a TLV primitive (the V in TLV)
- Update conventions -> Coroutines 1.9.0
- replace
runCatching
withcatching
to be extra-safe