Skip to content

Commit

Permalink
fix OID primary constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Oct 7, 2024
1 parent 1ca824c commit 423b9bb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ private val BIGINT_40 = BigInteger.fromUByte(40u)
* @throws Asn1Exception if less than two nodes are supplied, the first node is >2 or the second node is >39
*/
@Serializable(with = ObjectIdSerializer::class)
class ObjectIdentifier @Throws(Asn1Exception::class) constructor(
class ObjectIdentifier @Throws(Asn1Exception::class) private constructor(
val bytes: ByteArray,
@Transient private val _nodes: List<BigInteger>? = null, dontVerify: Boolean = false
) :
Asn1Encodable<Asn1Primitive> {

init {
if (_nodes == null || dontVerify) {
if (_nodes == null || !dontVerify) {
//Verify that everything can be parsed into nodes
if (bytes.isEmpty()) throw Asn1Exception("Empty OIDs are not supported")
var index = 1
Expand Down

0 comments on commit 423b9bb

Please sign in to comment.