You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we upgrade bouncycastle from 1.74 to 1.78,the function: org.bouncycastle.asn1.ASN1TaggedObject#getObject has been removed. can anyone give me some suggestions, use getBaseObject instead of?
e.g. code:
private static Optional findByTag(List authorizationList, int tag) {
for (ASN1Encodable entry : authorizationList) {
ASN1TaggedObject taggedEntry = (ASN1TaggedObject) entry;
if (taggedEntry.getTagNo() == tag) {
return Optional.of(taggedEntry.getObject());
}
}
return Optional.empty();
}
The text was updated successfully, but these errors were encountered:
ProbablygetExplicitBaseObject, but if you could tell us what ASN.1 type (e.g. from a specification) you are working with, there might be better options.
You should probably also replace if (taggedEntry.getTagNo() == tag) with if (taggedEntry.hasContextTag(tag) because a tagged object can have one of four tag classes and you are probably expecting only one of them (CONTEXT_SPECIFIC).
When we upgrade bouncycastle from 1.74 to 1.78,the function: org.bouncycastle.asn1.ASN1TaggedObject#getObject has been removed. can anyone give me some suggestions, use getBaseObject instead of?
e.g. code:
private static Optional findByTag(List authorizationList, int tag) {
for (ASN1Encodable entry : authorizationList) {
ASN1TaggedObject taggedEntry = (ASN1TaggedObject) entry;
if (taggedEntry.getTagNo() == tag) {
return Optional.of(taggedEntry.getObject());
}
}
return Optional.empty();
}
The text was updated successfully, but these errors were encountered: