This page describes how to set up the tools that are needed to generate handles and certificates on Windows machines.
Install tools
You will need to install the following:
Java
net software
OpenSSL Software
Install Java
To download and install Java, follow the instructions described in the Java website, selecting the “Windows online” version.
After installation, open the Command Prompt in administrator mode:
Press
Win+Son your keyboard.Type
cmdinthe search field.Righ-click
Command Promptand selectRun as administrator
Then check to see if Java is working by by typing the following command in Command Prompt:
java -version
If you receive the java version, then Java was correctly installed and you may proceed to the next step.
Install Handle.net software
Download the latest version of the Handle.net software from the Handle.Net Registry website.
Use 7-Zip to first unzip the .tar.gz file to a .tar file and then a second time to untar the file and extract the individual files. Note where the unzipped and untarred files are located.
Open the Command Prompt in administrator mode:
Press
Win+Son your keyboard.Type
cmdinthe search field.Righ-click
Command Promptand selectRun as administrator
Change your working directory to the unzipped and untarred Handle.net software folder and then run the hdl-admintool command by typing:
cd <path_to_untarred_handle_folder>\handle-9.2.0\binhdl-admintool
If the Handle.net software is properly installed, a Java screen will appear. Stop it again by closing the window.
Install OpenSSL software
Download the latest version of the OpenSSL software via this link.
Double-click on the downloaded .exe file to begin the installation process using the wizard, making sure to select “Select Aditional Tasks” and then the option to copy OpenSSL DLLs to “The OpenSSL binaries (/bin) directory”.
The installed files will be put in the folder C:\Program Files\OpenSSL-Win64.
Now we must set the environment variables permanently.
Begin by launching the Power User Task Menu:
Press
Win+Ron your keyboard.type
sysdm.cplin the Run dialog box and hitEnter.
This will launch the System Properties dialogue. Go to the “Advanced” tab and click on “Environment variables”.
Set the Path variable by copying the settings as shown in the image:
![]()
![]()
Open the Command Prompt in administrator mode:
Press
Win+Son your keyboard.Type
cmdin the search field.Right-click
Command Promptand selectRun as administrator
Type the following into the command prompt:
openssl version
If you receive the OpenSSL version, then OpenSSL was correctly installed and you can proceed to the next step.
For authentication using client certificates, a special pair of keys and a certificate file are required. Follow these steps to create them for your users after receiving your prefix and index from SURF: Go to the install directory and execute, replacing When it asks whether you want to encrypt the key, type ‘ Please send your public key file (e.g. Address your message to the "SURF ePIC PID service team". Make sure to include your name, username, your public key and your assigned prefix on the handle system. Wait until you have received confirmation that your public key file has been uploaded. To transform your binary private key into a .pem file you can use the command line tool Go to the install directory and execute: Create the certificate using Execute the following command to remove the public key from the certificate file, replacing the filenames per previous steps: If the previous instructions have been strictly followed, the following files have been generated: Or based on an example:Generating the client certificate and private/public key pair
1. Create a private/public key pair
<index> and <prefix> with your provided index and prefix:bash /.../handle-9.x.x/bin/hdl-keygen -alg rsa -keysize 4096 <prefix>_USER01_<index>_privkey.bin <prefix>_USER01_<index>_pubkey.bin
n’:Would you like to encrypt your private key? (y/n) [y] n
2. Send the public key to SURF
1000_USER01_310_pubkey.bin) to the SURF helpdesk or portal.3. Transform the binary private key (.bin) to a .pem file
hdl-convert-key that is shipped together with the Handle.net system software.bash /.../handle-9.x.x/bin/hdl-convert-key <prefix>_USER01_<index>_privkey.bin -o <prefix>_USER01_<index>_privkey.pem
4. Create the certificate file
openssl, making sure to include the subject (-subj) following the convention of /CN=<index>:<prefix>\/USER01 (e.g. /CN=310:1000\/USER01) and output filename (-out) following the convention <prefix>_<username>_<index>_certificate_and_publickey.pem (e.g. 1000_USER01_310_certificate_and_publickey.pem):openssl req -pubkey -x509 -new -sha256 -subj "/CN=<index>:<prefix>\/USER01" -days 3652 -key <prefix>_USER01_<index>_privkey.pem -out <prefix>_USER01_<index>_certificate_and_publickey.pem
5. Remove the public key from the certificate file
openssl x509 -inform PEM -in <prefix>_USER01_<index>_certificate_and_publickey.pem -out <prefix>_USER01_<index>_certificate_only.pem
Results
<prefix>_USER01_<index>_privkey.pem
<prefix>_USER01_<index>_pubkey.bin
<prefix>_USER01_<index>_certificate_and_publickey.pem
<prefix>_USER01_<index>_certificate_only.pem
1000_USER01_310_privkey.pem
1000_USER01_310_pubkey.bin
1000_USER01_310_certificate_and_publickey.pem
1000_USER01_310_certificate_only.pem
Table of contents
- No labels