Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Bouncy castle PKCS10certificate builder info

user-g6kngMay 17 2023

We are in the process of our release and are currently blocked because of one issue.

so your input on this will be very helpful. we recently moved to 3.0.8 from 1.0.2

one of our counterparts in our organization where we call them to provide some certs (pub/priv/passphrase) information which we store and later use for connecting them (https) when we are on the customer site. This is where we are facing issues now.

They are using the below Java code to generate the certificate pair and pass it to our application.

snippet:
// generate PKCS10 certificate request
X500Principal subjectName = new X500Principal(cn);
PKCS10CertificationRequestBuilder p10Builder = new JcaPKCS10CertificationRequestBuilder(subjectName, keyPair.getPublic());
JcaContentSignerBuilder csBuilder = new JcaContentSignerBuilder(KEY_SHA_256_WITH_RSA);
ContentSigner signer = csBuilder.build(keyPair.getPrivate());
PKCS10CertificationRequest csr = p10Builder.build(signer);
// get the csr
return Base64.toBase64String(csr.getEncoded());

so the way certificate generation using pkcs10 the issue? Will it internally use the pkcs12kdf algorithm?

when we checked the certs from the openssl command it clearly throws an error as PKCS12KDF is unsupported.

[root@783fb53751be ESE_client]# OPENSSL_CONF=/tmp/openssl.cnf openssl s_client -connect 10.105.130.237:443 --cert test.crt --key pkey.pem

Enter pass phrase for pkey.pem:

Could not read client certificate private key from pkey.pem

40474654647F0000:error:1608010C:STORE routines:(unknown function):unsupported:crypto/store/store_result.c:151:

40474654647F0000:error:0308010C:digital envelope routines:(unknown function):unsupported:crypto/evp/evp_fetch.c:373:Global default library context, Algorithm (PKCS12KDF : 0), Properties (<null>)

40474654647F0000:error:1180006B:PKCS12 routines:(unknown function):key gen error:crypto/pkcs12/p12_crpt.c:55:

could you please provide your thoughts on how to resolve this issue?

Comments

The language shown in the Forms runtime is the result of your NLS_LANG setting in the runtime environment configuration (e.g. default.env). However, Forms can only change the language of labels it knows about. For example, the ones you highlighted. The column titles, in your example are labels that you elected to use (or column names from the DB). As a result, we cannot change them automatically because we would have no idea if that is what you wanted to do.

You would need to programmatically change those if desired. For example:

SET_LOV_COLUMN_PROPERTY ('LOV1', 2, TITLE, 'Nombre del empleado (Spanish)');

In this example, I am running a form in English but want one column to show in Spanish. So, I use the code above to make that change at runtime.

xu meng Feb 12 2025

Thanks for your reply, your example has inspired me a bit, but it still can't meet my usage needs.
I'm confused about:
When my system language variable is Chinese, I want to make the LOV component's Query/Confirm/Cancel button appear separately in other languages. As shown in the image above.
I don't know, but you can understand what I mean.

xu meng Feb 12 2025

As shown on the picture you provided. "查询" is displayed when the Chinese environment variable is used, and "FIND" is displayed when it is used in English. At present, I want to make the button of its LOV component window display "FIND" separately in the Chinese system, but I have not found the method in the help document and the network.

As I mentioned, strings built into Forms like “Find”, “Ok”, “Cancel”, and others can be translated into the language you choose in the runtime environment using the NLS_LANG settings. Unfortunately, this cannot be changed after the application has been started. So if the app is started with for example, Chinese-Traditional it cannot later be changed to French while the form is running. This means that you must either configure your server to support multiple languages and create modules for each language. This is often the best approach. There are other ways that customers have used, but what I described here likely would require the smallest effort.

You did not mention which Forms version you are using and therefore I cannot point you to the documentation for that version. However, here is the link to the related documentation for Forms 14.1.2. The concepts are basically the same for earlier versions, although some minor improvements have been introduced in the latest release (14.1.2).

https://docs.oracle.com/en/middleware/developer-tools/forms/14.1.2/working-forms/enabling-language-detection.html

But again, for strings that do not natively belong to Forms (you created them) you would need to programmatically change them as necessary.

xu meng Feb 12 2025

OH! I will try to implement your plan first. Thank you for your patience. My Forms version is 11.1.2.

As you are likely aware, but I feel it necessary to mention in case you are not, Forms 11.1.2 was desupported many years ago. I recommend you consider upgrading to the latest Supported version in order to ensure that you can get the latest bug fixes (including security fixes), the latest features, and improvements like what I mentioned about language support and others.

Details can always be found on the Forms product page.

https://www.oracle.com/application-development/technologies/forms/forms.html

xu meng Feb 12 2025

Thank you for telling me this news. I will consider your suggestion carefully and refer to it later. Thank you for your answer.

1 - 7

Post Details

Added on May 17 2023
0 comments
638 views