8274330: Incorrect encoding of the DistributionPointName object in IssuingDistributionPointExtension

Reviewed-by: ascarpino
This commit is contained in:
Weijun Wang 2021-09-29 15:37:16 +00:00
parent 980c50dc60
commit edd9d1c97b
2 changed files with 52 additions and 2 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -393,7 +393,8 @@ public class IssuingDistributionPointExtension extends Extension
if (distributionPoint != null) {
DerOutputStream tmp = new DerOutputStream();
distributionPoint.encode(tmp);
tagged.writeImplicit(DerValue.createTag(DerValue.TAG_CONTEXT, true,
// DistributionPointName is CHOICE. Do not writeImplicit.
tagged.write(DerValue.createTag(DerValue.TAG_CONTEXT, true,
TAG_DISTRIBUTION_POINT), tmp);
}