dcmrenew returns 'null' response and fails to renew the certificate #48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've made a couple of fixes to the certificate renewer but this unfortunately isn't the whole story.
Even after these fixes I'm still getting some problems with the dcmrenew command but could do with some help from a Java programmer (I'm not one) who also understands the
com.ibm.as400.access.ServiceProgramCallclass.When I try running
dcmrenewusing the new code I get the following error.The CPF9872 message has the following cause text "The specified program or service program was ended due to one of the following: 1 -- A pointer was used that is not available for use while running in the current program state. 2 -- A pointer was used, either directly or as a basing pointer, that has not been set to an address. 3 -- A pointer type was not valid for the requested operation. 4 -- An error was found while checking parameter structure. 5 -- The caller is not allowed to use this interface. Recovery . . . : Correct the parameter list passed to the program or service program and try the request again. If the reason code is 5, you will need to use a different interface.".
I've not been able to work out exactly what the problem is here. I did enable
Traceand it looks to me as though the parameters going in are correct.Some things about the code that I'm not sure about but on the surface seem wrong.
QycdRenewCertificateis not the original Base64 encoded certificate given on the command line. It passes a temporary file, generated in the KeyStoreLoader class. The API expects an X509 Base64 encoded file.callQycdRenewCertificate_RNWC0300method executes therunProgrammethod and passes theServiceProgramCallobject in as the second parameter. TherunProgrammethod expects aProgramCallobject as the second parameter. This maybe OK in Java.