Month: April 2014

Generating an Apple CSR with Windows

So I am in the process of releasing an application to iOS but I don’t have a Mac. One of the things that I need to do for releasing development versions of my application I need to create a Certificate Signing Request (CSR). Follow the steps below in order to be able to do it.

1) Download OpenSSL if you don’t already have it. There is an installer available
2) Open a command prompt.
3) Set the location of the configuration file using set OPENSSL_CONF=c:\OpenSSL-Win32\bin\openssl.cfg otherwise you’ll get the warning. WARNING: can’t open config file: /usr/local/ssl/openssl.cnf
4) cd \OpenSSL-Win32\bin
5) openssl req -nodes -newkey rsa:2048 -keyout private_key.key -out cer_sign_request.csr
6) Fill out the answers to the questions. Most are self explanatory.
7) You should now have a file called cer_sign_request.csr in \OpenSSL-Win32\bin

Where to find GenericConstants.AM_REQUEST_TOKEN_IDENTIFIER when creating a custom login page for Oracle WebCenter

Whilst working on creating a custom login screen for Oracle WebCenter I came across something in the instructions that was assumed and undocumented.

In the guide Developing Custom Pages it contains the code below:

String reqToken = request.getParameter(GenericConstants.AM_REQUEST_TOKEN_IDENTIFIER);

if(reqToken != null && reqToken.length() > 0) {%>
<input type="hidden" name="" value="">

However, I couldn’t find the location of GenericConstants.AM_REQUEST_TOKEN_IDENTIFIER anywhere, google searches returned nothing of any use. Hence why I’m sharing this.

The jar that you need to include in your project is bizarrely only available on the target OAM server! If you search for utilities.jar which on our server was located at $MIDDLEWARE_HOME/user_projects/domains/OAMDomain/servers/oam_server1/tmp/_WL_user/oam_server_11.

Bits of this path will be different on your system beacause of how your domain is configured, however, you should roughly have the structure.

Copy the utilities.jar to your projects lib folder and include it in the JDeveloper libraries for your custom login page project. You should then have access to these pre-defined Strings.