Skip to content

Commit 17b8942

Browse files
metsmamrts
authored andcommitted
Encode correctly OCSP NONCE extension
WE2-819 Signed-off-by: Raul Metsma <[email protected]>
1 parent 79420b1 commit 17b8942

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/eu/webeid/security/validator/ocsp/OcspRequestBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public OCSPReq build() throws OCSPException {
6868
try {
6969
addNonce(builder);
7070
} catch (IOException e) {
71-
throw new OCSPException("Failed to generate OCSP nonce extension", e);
71+
throw new OCSPException("Failed to generate OCSP NONCE extension", e);
7272
}
7373
}
7474

@@ -81,7 +81,7 @@ private void addNonce(OCSPReqBuilder builder) throws IOException {
8181

8282
final Extension[] extensions = new Extension[]{
8383
new Extension(OCSPObjectIdentifiers.id_pkix_ocsp_nonce, false,
84-
// Follow OpenSSL OCSP nonce encoding convention and add double octet string header.
84+
new DEROctetString(new DEROctetString(nonce)))
8585
new DEROctetString(new DEROctetString(nonce)))
8686
};
8787
builder.setRequestExtensions(new Extensions(extensions));

0 commit comments

Comments
 (0)