|
From: Tomas G. <to...@pr...> - 2019-08-05 10:35:13
|
Hi Jaime, This issue, with the simple patch looks really good. I see the issue you have reproduced. Could you create a jira issue for this? Also, the documentation for "Use queue for CRLs" in https://download.primekey.com/docs/EJBCA-Enterprise/6_15_2/Publishers.html should be updated I think. It should be clear that even if you use direct publishing, and it works, the CRL will be stored in the queue if this is enabled. A java comment for the patch line would be good as well. // publishStatus can only be eityher STATUS_PENDING or STATUS_SUCCESS, for CRLs we want to store with the actual status, that may be STATUS_SUCCESS if it was published directly above Cheers, Tomas On 2019-07-26 00:58, Jaime Hablutzel wrote: > If a publisher with the following settings is configured: > > * *No direct publishing, only use queue:* Disabled > * *Keep successfully published items in database:* Enabled > * *Use queue for CRLs:* Enabled > > And it publishes a CRL successfully, the CRL will be kept in the > publisher queue with STATUS_PENDING anyway and something like a Publish > Queue Process Service will be required to process it again and mark it > with STATUS_SUCCESS, resulting in the CRL published twice, instead of > only once. > > A simple patch follows: > > --- > modules/ejbca-ejb/src/org/ejbca/core/ejb/ca/publisher/PublisherSessionBean.java > (revision 32884) > +++ > modules/ejbca-ejb/src/org/ejbca/core/ejb/ca/publisher/PublisherSessionBean.java > (date 1563994959367) > @@ -309,7 +309,7 @@ > pqvd.setUserDN(issuerDn); > String fp = CertTools.getFingerprintAsString(incrl); > try { > - publisherQueueSession.addQueueData(id, > PublisherConst.PUBLISH_TYPE_CRL, fp, pqvd, PublisherConst.STATUS_PENDING); > + publisherQueueSession.addQueueData(id, > PublisherConst.PUBLISH_TYPE_CRL, fp, pqvd, publishStatus); > String msg = > intres.getLocalizedMessage("publisher.storequeue", name, fp, "CRL"); > log.info <http://log.info>(msg); > } catch (CreateException e) { > -- > Jaime Hablutzel - +51 994690880 > > > _______________________________________________ > Ejbca-develop mailing list > Ejb...@li... > https://lists.sourceforge.net/lists/listinfo/ejbca-develop > |