UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

createCertificate Syntax createCertificate(action, req, signKey, keyPass, CAcert, days, extensions, certOut) Note: This function is case-sensitive. If you want it to be case-insensitive, you must compile your programs using the BASIC command with the -i option. Description The createCertificate function generates a certificate. The certificate can either be a self-signed certificate as a root CA that you can use later to sign other certificates, or it can be a CA signed certificate. The generated certificate conforms to X509V3 standard. The difference between CA-signing and leaf-CA-signing is that, for CA-signing, the resultant certificate can serve as an intermediate CA certificate to sign other certificates, while leaf-CA-signing generates certificates that are intended for end user use only. This function is provided mainly for the purpose of enabling application development and testing. As such, the certificate generated contains only a minimum amount of information and does not allow any extensions specified by the X509 standard and that are supported by many other vendors. It is recommended that you implement a complete PKI solution partnered with a reputed PKI solution vendor. For detailed information about the createCertificate function, see UniBasic Extensions. 1-175 UniBasic Commands Reference

Parameters The following table describes each parameter of the syntax. Parameter Description action 1 - Self-signing 2 - CA-signing 3 - leaf-CA-signing req A string containing the certificate request file name. signKey A string containing the private key file name. keyPass A string containing the pass phrase to protect the private key. CAcert A string containing the CA certificate. days The number of days for which the certificate is valid. The default is 365 days. extensions A string containing extension specifications. certOut A string containing the generated certificate file. createCertificate Parameters The following table describes the status of each return code. Return Code Status 0 Success. 1 Cannot read certificate request file. 2 Cannot read the key file. 3 Cannot read the CA certificate file. 4 Cannot generate the certificate. Return Code Status createCertificate 1-176

createCertificate<br />

Syntax<br />

createCertificate(action, req, signKey, keyPass, CAcert, days, extensions, certOut)<br />

Note: This function is case-sensitive. If you want it to be case-insensitive, you<br />

must compile your programs using the BASIC command with the -i option.<br />

Description<br />

The createCertificate function generates a certificate. The certificate can either be a<br />

self-signed certificate as a root CA that you can use later to sign other certificates, or<br />

it can be a CA signed certificate. The generated certificate conforms to X509V3<br />

standard.<br />

The difference between CA-signing and leaf-CA-signing is that, for CA-signing, the<br />

resultant certificate can serve as an intermediate CA certificate to sign other certificates,<br />

while leaf-CA-signing generates certificates that are intended for end user use<br />

only.<br />

This function is provided mainly for the purpose of enabling application development<br />

and testing. As such, the certificate generated contains only a minimum amount of<br />

information and does not allow any extensions specified by the X509 standard and<br />

that are supported by many other vendors. It is recommended that you implement a<br />

complete PKI solution partnered with a reputed PKI solution vendor.<br />

For detailed information about the createCertificate function, see <strong>UniBasic</strong><br />

Extensions.<br />

1-175 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!