Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Assign Certificate to DCM Application #22

Open
ghost opened this issue Feb 15, 2022 · 2 comments
Open

[BUG] Assign Certificate to DCM Application #22

ghost opened this issue Feb 15, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 15, 2022

I tried to assign a certificate to an application.
This i the qshell output:

dcmassign
shortname for 'QIBM_QTV_TELNET_SERVER' is 'TELNET'
shortname for 'QIBM_GLD_DIRSRV_SERVER' is 'DIRSRV'
shortname for 'QIBM_QTMS_SMTP_SERVER' is 'SMTP'
shortname for 'QIBM_QTMF_FTP_SERVER' is 'FTP'
shortname for 'QIBM_QTMM_POP_SERVER' is 'POP'
shortname for 'QIBM_QSVR_OBJC_SERVER' is 'OBJC'
Enter application ID:
FTP
Assigning to QIBM_QTMF_FTP_SERVER...
Enter certificate ID:
2022-02
The parameter [0]: Parameter value is not valid.
$

@ghost
Copy link
Author

ghost commented Feb 17, 2022

According to IBM Support this is the result of using more than 7 parameters in ServiceProgramCall.
With a PTF some months ago, this limit was raised to 248 parameters but you have to submit the parameters as pointers.
So if you could change for example in your DcmApiCaller:
In for example method:
public void callQycdUpdateCertUsage

// 1 Application ID Output Char(*)
parameterList[0] = new ProgramParameter(new AS400Text(_appId.length()).toBytes(_appId));

to

// 1 Application ID Output Char(*)
parameterList[0] = new ProgramParameter(new AS400Text(_appId.length()).toBytes(_appId));
parameterList[0].setParameterType(ProgramParameter.PASS_BY_REFERENCE);

and so on, it should work.

@ThePrez
Copy link
Owner

ThePrez commented Apr 7, 2022

Thanks for the insight, @DeltaE0 !

ThePrez added a commit that referenced this issue Apr 8, 2022
ThePrez added a commit that referenced this issue Apr 10, 2022
* start rework to use IBMi5OSKeyStore

* fixup

* optimize `dcmexportcert` if format is pkcs12

* fix `dcmrenew`

* fixup

* code fix per comment in issue #22

Co-authored-by: Jesse Gorzinski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant