Re: Creating X509 certificates
You are a bit confused.
In the template for generating a certificate, in the CKA_VALUE you should set a DER encoded X509 certificate not a random number.
Also, you set some attributes that are not valid for a certificate, such as MODULUS_BIT.
If you want to generate a key pair you should use the generateKeyPair method.
Then, to generate a certificate you should call a CA.