Xbasic

INET::SSLContext::CreateCertificateRequest Method

Syntax

Result_Flag as L = CreateCertificateRequest(CertificateFile as C, PrivateKeyFile as C, PrivateKeyPassword as C [, CountryCode = "US" as C [, State = "MA" as C [, Locality = "Burlington" as C [, Organization = "Alpha Software Customer" as C [, OrganizationalUnit = "Development Test" as C [, CommonName = "www.mydomain.com" as C [, EMail = "" as C ]]]]]]])

Arguments

Result_Flag

TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).

CertificateFile

The path and name of the certificate file.

PrivateKeyFile

The path and name of the private key file.

PrivateKeyPassword

The password for the private key file.

CountryCode = "US"

Optional. Default = "US".

State = "MA"

Optional. Default = "MA".

Locality = "Burlington"

Optional. Default = "Burlington".

Organization = "Alpha Software Customer"

Optional. Default = "Alpha Software Customer".

OrganizationalUnit = "Development Test"

Optional. Default = "Development Test".

CommonName = "www.mydomain.com"

Optional. Default = "Server Test Certificate".

EMail = ""

Character

Description

Create a reqest for a certificate.

Discussion

The INET::SSLContext::CreateCertificateRequest() method creates a request for a SSL Server Certificate.

Example

dim ctx as INET::SSLContext
if ctx.CreateCertificateRequest(RequestFile, KeyFile, Password, "US", "MA", "Burlington", "Alpha Software, Inc.", "Dev", "Dev Test Request")
    Result = "Request successfully created"
else
    Result = "Error creating certificate request: " + ctx.callresult.text
end if
ui_msg_box("Create certificate request: " + RequestFile, Result)

See Also