UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
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
- Page 122 and 123: CASE Syntax BEGIN CASE CASE express
- Page 124 and 125: In the next example, the program se
- Page 126 and 127: Related Commands UniBasic CATS, SPL
- Page 128 and 129: CHAIN Syntax CHAIN "str.expr" Descr
- Page 130 and 131: CHANGE Syntax CHANGE(string, old.su
- Page 132 and 133: CHAR Syntax CHAR(expr) Description
- Page 134 and 135: CHARLEN Syntax CHARLEN (string) Des
- Page 136 and 137: CHECKSUM Syntax CHECKSUM(str.expr)
- Page 138 and 139: Related Commands UniBasic COMMON, C
- Page 140 and 141: UniData DELETECOMMON, STACKCOMMON -
- Page 142 and 143: CLEARFILE Syntax CLEARFILE [file.va
- Page 144 and 145: CLEARINPUT Syntax CLEARINPUT Synony
- Page 146 and 147: UniQuery GET.LIST, SELECT, SSELECT
- Page 148 and 149: CLOSE Syntax CLOSE [file.var] [ON E
- Page 150 and 151: CLOSESEQ Syntax CLOSESEQ seq.file.v
- Page 152 and 153: closeSocket Syntax closeSocket(sock
- Page 154 and 155: COL1 Syntax COL1( ) Description The
- Page 156 and 157: COMMON Syntax COMMON [/common.name/
- Page 158 and 159: 1-161 UniBasic Commands Reference
- Page 160 and 161: UniData DELETECOMMON, STACKCOMMON -
- Page 162 and 163: Related Command UniBasic EXIT 1-165
- Page 164 and 165: In the next example, the program se
- Page 166 and 167: In the next example, the program se
- Page 168 and 169: COUNT Syntax COUNT(str.expr1, str.e
- Page 170 and 171: COUNTS Syntax COUNTS(expr,str.expr)
- Page 174 and 175: createCertRequest Syntax createCert
- Page 176 and 177: Parameter Description The following
- Page 178 and 179: The following table describes the a
- Page 180 and 181: createSecureRequest Syntax createSe
- Page 182 and 183: Method Description The following ta
- Page 184 and 185: Parameters The following table desc
- Page 186 and 187: DATA Syntax DATA expr1 [,expr2]...
- Page 188 and 189: DBTOXML Syntax DBTOXML(xml_document
- Page 190 and 191: DCOUNT Syntax DCOUNT(str,delim) Des
- Page 192 and 193: DEACTIVATEKEY Syntax DEACTIVATEKEY
- Page 194 and 195: STATUS Code Example The following e
- Page 196 and 197: DEFFUN Syntax DEFFUN function.name
- Page 198 and 199: The preceding program calls the fol
- Page 200 and 201: Examples The following program segm
- Page 202 and 203: Examples The following program stat
- Page 204 and 205: In the next example, the program st
- Page 206 and 207: UniData SQL SELECT - For informatio
- Page 208 and 209: Examples In the following example,
- Page 210 and 211: Parameters The following table desc
- Page 212 and 213: DIGEST Syntax DIGEST(algorithm, dat
- Page 214 and 215: DIR Syntax DIR(file.expr) Descripti
- Page 216 and 217: STATUS Codes DISABLEDEC has the fol
- Page 218 and 219: DISPLAYWIDTH Syntax DISPLAYWIDTH (s
- Page 220 and 221: DQUOTE DQUOTE is a synonym for the
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>