use of org.apache.kerby.asn1.type.Asn1Integer in project webauthn4j by webauthn4j.
the class KeyDescriptionValidator method getIntegerFromAsn1.
@Nullable
private BigInteger getIntegerFromAsn1(Asn1ParseResult asn1Value) throws IOException {
if (asn1Value == null) {
return null;
}
if (!asn1Value.isPrimitive()) {
throw new BadAttestationStatementException(String.format("ASN1Integer is expected. Found %s instead.", asn1Value.getClass().getName()));
}
Asn1Integer value = new Asn1Integer();
value.decode(asn1Value);
return value.getValue();
}
Aggregations