|
Brad, Perhaps you have something else wrong since setting the localCertificate variable to *Null or to point to storage allocated with Alloc works fine for me. But then it's not required for the process to work anyway. Not that I really wanted to do anything with the local cert anyway but I never managed to get back any returned content for localCertificate that appeared to be in the correct format that could be passed to any other certificate APIs. Peter -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Brad Stone Sent: Friday, January 16, 2004 9:08 AM To: RPG programming on the AS400 / iSeries Subject: Question on allocating Storage I'm working withthe SSL_Init_Application API and seem to be having a problem with one of the variables in the structure. The definition of the field in the structure is: ---------------- char* localCertificate; /* local certificate ---------------- The description for this is: ---------------- char *localCertificate (input) On input, the localCertificate pointer must be set to point to storage that has been allocated by the calling application that will be used on output to contain the application's registered local certificate. If a certificate is not to be returned then set this pointer's value to NULL and the localCertificateLen value to zero (0). The storage should be large enough to accomodate the size of the certificate. Most certificates are less than 2K in length. On output, the localCertificate pointer will not be changed, though the storage it points to will contain the registered application's certificate. The certificate will be the one registered for that application via the Register Application for Certificate Use (OPM, QSYRGAP; ILE, QsyRegisterAppForCertUse) API. See the Register Application for Certificate Use API for information on the format and values allowed for the application identifier. -------------------- I keep getting a "the specified parameter is invalid" when using this API and assigning a certificate to the application that I have registered with DCM. So, what I would like to ask is, if you were to define and allocate storage as described above, how would you do it? What I did was simply create a user defined character variable and then assign the pointer to that variable. I also tried ALLOC and that resulted in the same error. Because this API works when no certificate is assigned to the application, and not when there is a certificate assigned, that is leading me to believe that I have done something wrong with this parm in the structure. Thanks! _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. ##################################################################################### This correspondence is for the named person's use only. It may contain confidential or legally privileged information, or both. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Baycorp Advantage. If you need assistance, please contact Baycorp Advantage on either :- Australia 133124 or New Zealand +64 9 356 5800
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.