1 | Certificate | Input | Char(*) |
2 | Type | Input | Binary(4) |
3 | Length of certificate | Input | Binary(4) |
4 | Format | Input | Char(8) |
5 | Receiver variable | Output | Char(*) |
6 | Length of receiver variable | Input | Binary(4) |
7 | Error code | I/O | Char(*) |
#include <qsydigid.h> void QsyParseCertificate( char *Certificate, int Type, int Length_of_certificate, char *Format_name, char *Receiver_variable, int Length_of_receiver_variable, void *Error_code );Service Program: QSYDIGID
The Parse Certificate (OPM, QSYPARSC; ILE, QsyParseCertificate) API parses a certificate and returns the results to the caller.
None
The entire certificate encoded in Abstract Syntax Notation 1 Distinguished Encoding Rules (ASN.1 DER) format. This is not a text string.
The type or format of the certificate.
The possible types are:
1 | Entire X.509 public key certificate in ASN.1 DER encoding. |
3 | Base 64 encoded version of the entire X.509 public key certificate in ASN.1 DER encoding. Note that the characters of the Base 64 encoding are the ASCII representation and not the EBCDIC representation. |
The length of the certificate.
The format of the parsed certificate.
The possible types are:
CERT0200 | All text fields available. |
CERT0210 | All text fields available. None of the fields are translated from the ASCII format that they had in the certificate into the job CCSID. |
The storage that is provided by the user to hold the certificate text. For more information, see Format of Receiver Variable.
The length of the storage that is provided by the user.
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
If format CERT0200 is specified, the Offset to EIM identifier, Length of EIM identifier, Offset to EIM local registry name, Length of EIM local registry name, Offset to user name, and Length of user name fields will be 0.
For details about the format that is returned in the receiver variable, for Format CERT0200 see Certificate Format CERT0200 (Plain Text).
The following tables describe the order and format of the data returned in the receiver variable for Format CERT0210. For detailed descriptions of the fields in the tables, see Field Descriptions.
Note: A distinguished name (DN) consists of the following fields in the order presented:
The CERT0210 format consists of a certificate handle and some of the sections of the certificate parsed into a more readable format. If the length of a field is 0 or the offset to a field is 0, then the field does not contain any information. Either the field is empty, it is not used in the certificate, or it is not recognized. The fields specified by the offsets and lengths in this format are either text or hexadecimal bytes as indicated in the field descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Returned length of this certificate and format information |
4 | 4 | BINARY(4) | Available length of this certificate and format information |
8 | 8 | BINARY(4) | Offset to certificate handle |
12 | C | BINARY(4) | Length of certificate handle |
16 | 10 | BINARY(4) | Offset to version |
20 | 14 | BINARY(4) | Length of version |
24 | 18 | BINARY(4) | Offset to serial number |
28 | 1C | BINARY(4) | Length of serial number |
32 | 20 | BINARY(4) | Offset to issuer's common name |
36 | 24 | BINARY(4) | Length of issuer's common name |
40 | 28 | BINARY(4) | Offset to issuer's country or region |
44 | 2C | BINARY(4) | Length of issuer's country or region |
48 | 30 | BINARY(4) | Offset to issuer's state or province |
52 | 34 | BINARY(4) | Length of issuer's state or province |
56 | 38 | BINARY(4) | Offset to issuer's locality |
60 | 3C | BINARY(4) | Length of issuer's locality |
64 | 40 | BINARY(4) | Offset to issuer's organization |
68 | 44 | BINARY(4) | Length of issuer's organization |
72 | 48 | BINARY(4) | Offset to issuer's organizational unit |
76 | 4C | BINARY(4) | Length of issuer's organizational unit |
80 | 50 | BINARY(4) | Offset to issuer's postal code |
84 | 54 | BINARY(4) | Length of issuer's postal code |
88 | 58 | BINARY(4) | Offset to validity period start |
92 | 5C | BINARY(4) | Length of validity period start |
96 | 60 | BINARY(4) | Offset to validity period end |
100 | 64 | BINARY(4) | Length of validity period end |
104 | 68 | BINARY(4) | Offset to subject's common name |
108 | 6C | BINARY(4) | Length of subject's common name |
112 | 70 | BINARY(4) | Offset to subject's country or region |
116 | 74 | BINARY(4) | Length of subject's country or region |
120 | 78 | BINARY(4) | Offset to subject's state or province |
124 | 7C | BINARY(4) | Length of subject's state or province |
128 | 80 | BINARY(4) | Offset to subject's locality |
132 | 84 | BINARY(4) | Length of subject's locality |
136 | 88 | BINARY(4) | Offset to subject's organization |
140 | 8C | BINARY(4) | Length of subject's organization |
144 | 90 | BINARY(4) | Offset to subject's organizational unit |
148 | 94 | BINARY(4) | Length of subject's organizational unit |
152 | 98 | BINARY(4) | Offset to subject's postal code |
156 | 9C | BINARY(4) | Length of subject's postal code |
160 | A0 | BINARY(4) | Offset to subject's public key algorithm |
164 | A4 | BINARY(4) | Length of subject's public key algorithm |
168 | A8 | BINARY(4) | Offset to issuer's unique ID (Version 2) |
172 | AC | BINARY(4) | Length of issuer's unique ID (Version 2) |
176 | B0 | BINARY(4) | Offset to subject's unique ID (Version 2) |
180 | B4 | BINARY(4) | Length of subject's unique ID (Version 2) |
184 | B8 | BINARY(4) | Offset to issuer's email address |
188 | BC | BINARY(4) | Length of issuer's email address |
192 | C0 | BINARY(4) | Offset to subject's email address |
196 | C4 | BINARY(4) | Length of subject's email address |
216 | D8 | BINARY(4) | Offset to issuer's distinguished name (DN) in DER representation |
220 | DC | BINARY(4) | Length of issuer's distinguished name (DN) in DER representation |
224 | E0 | BINARY(4) | Offset to subject's distinguished name (DN) in DER representation |
228 | E4 | BINARY(4) | Length of subject's distinguished name (DN) in DER representation |
232 | E8 | BINARY(4) | Offset to certificate public key in DER representation |
236 | EC | BINARY(4) | Length of certificate public key in DER representation |
ARRAY(*) of CHAR | Certificate information |
Available length of this certificate and format information. The available length of this certificate and format information. If this length is more than the returned length of this certificate and format information field, then not all of the fields were returned.
Fields specified by their offsets and lengths above. The fields that were specified by their offsets and lengths prior to this field.
Certificate information. The actual data in the certificate. Specific fields can be accessed by using the offset to the specific field.
Format name. The format of the returned output.
Length of ASN.1 format certificate. The length of the ASN.1 DER format certificate. This length refers to a field of hexadecimal bytes.
Length of certificate handle. The length of the certificate handle. This length refers to a field of hexadecimal bytes.
Length of certificate public key in DER representation. The length of the certificate public key. This length refers to a field of hexadecimal bytes.
Length of issuer's common name. The length of the field that indicates the issuer's common name.
Length of issuer's country or region. The length of the field that indicates the issuer's country or region.
Length of issuer's distinguished name (DN) in DER representation. The length of the field that indicates the issuer's DN in DER representation.
Length of issuer's email address. The length of the field that indicates the issuer's email address.
Length of issuer's locality. The length of the field that indicates the issuer's locality.
Length of issuer's organization. The length of the field that indicates the issuer's organization.
Length of issuer's organizational unit. The length of the field that indicates the issuer's organizational unit.
Length of issuer's postal code. The length of the field that indicates the issuer's postal code.
Length of issuer's state or province. The length of the field that indicates the issuer's state or province.
Length of issuer's unique ID (Version 2). The length of the field that indicates the issuer's unique ID (Version 2). This length refers to a field of hexadecimal bytes.
Length of serial number. The length of the field that indicates the serial number.
Length of subject's common name. The length of the field that indicates the subject's common name.
Length of subject's country or region. The length of the field that indicates the subject's country or region.
Length of subject's distinguished name (DN) in DER representation. The length of the field that indicates the subject's DN in DER representation.
Length of subject's email address. The length of the field that indicates the subject's email address.
Length of subject's locality. The length of the field that indicates the subject's locality.
Length of subject's organization. The length of the field that indicates the subject's organization.
Length of subject's organizational unit. The length of the field that indicates the subject's organizational unit.
Length of subject's postal code. The length of the field that indicates the subject's postal code.
Length of subject's public key algorithm. The length of the field that indicates the subject's public key algorithm.
Length of subject's state or province. The length of the field that indicates the subject's state or province.
Length of subject's unique ID (Version 2). The length of the field that indicates the subject's unique ID (Version 2). This length refers to a field of hexadecimal bytes.
Length of validity period start. The length of the field that indicates the beginning date of the validity period. The first 8 characters consist of 4 characters for the year, 2 characters for the month, and 2 characters for the day. The last 6 characters consist of 2 characters for the hours, 2 characters for the minutes, and 2 characters for the seconds.
Length of validity period end. The length of the field that indicates the ending date of the validity period. The first 8 characters consist of 4 characters for the year, 2 characters for the month, and 2 characters for the day. The last 6 characters consist of 2 characters for the hours, 2 characters for the minutes, and 2 characters for the seconds.
Length of version. The length of the field that indicates the version. This length refers to a field of hexadecimal bytes.
Offset to ASN.1 format certificate. The offset to the ASN.1 DER format certificate. This offset refers to a field of hexadecimal bytes.
Offset to certificate handle. The offset to the certificate handle. This offset refers to a field of hexadecimal bytes.
Offset to certificate public key in DER representation. The offset to the certificate public key. This offset refers to a field of hexadecimal bytes.
Offset to issuer's common name. The offset to the field that indicates the issuer's common name.
Offset to issuer's country or region. The offset to the field that indicates the issuer's country or region.
Offset to issuer's distinguished name (DN) in DER representation. The offset to the field that indicates the issuer's DN in DER representation.
Offset to issuer's email address. The offset to the field that indicates the issuer's email address.
Offset to issuer's locality. The offset to the field that indicates the issuer's locality.
Offset to issuer's organization. The offset to the field that indicates the issuer's organization.
Offset to issuer's organizational unit. The offset to the field that indicates the issuer's organizational unit.
Offset to issuer's postal code. The offset to the field that indicates the issuer's postal code.
Offset to issuer's state or province. The offset to the field that indicates the issuer's state or province.
Offset to issuer's unique ID (Version 2). The offset to the field that indicates the issuer's unique ID (Version 2). This offset refers to a field of hexadecimal bytes.
Offset to serial number. The offset to the field that indicates the serial number.
Offset to subject's common name. The offset to the field that indicates the subject's common name.
Offset to subject's country or region. The offset to the field that indicates the subject's country or region.
Offset to subject's distinguished name (DN) in DER representation. The offset to the field that indicates the subject's DN in DER representation.
Offset to subject's email address. The offset to the field that indicates the subject's email address.
Offset to subject's locality. The offset to the field that indicates the subject's locality.
Offset to subject's organization. The offset to the field that indicates the subject's organization.
Offset to subject's organizational unit. The offset to the field that indicates the subject's organizational unit.
Offset to subject's postal code. The offset to the field that indicates the subject's postal code.
Offset to subject's public key algorithm. The offset to the field that indicates the subject's public key algorithm.
Offset to subject's state or province. The offset to the field that indicates the subject's state or province.
Offset to subject's unique ID (Version 2). The offset to the field that indicates the subject's unique ID (Version 2). This offset refers to a field of hexadecimal bytes.
Offset to validity period start. The offset to the field that indicates the beginning date of the validity period.
Offset to validity period end. The offset to the field that indicates the ending date of the validity period.
Offset to version. The offset to the field that indicates the version. This offset refers to a field of hexadecimal bytes.
Reserved. An ignored field.
Returned length of this certificate and format information. The total length of this certificate and format information that was returned. This length is for one certificate and can be used to access the next certificate in the list.
User name. The name of the user profile that is specified in the call to the API.
Message ID | Error Message Text |
---|---|
CPFA0AA E | Error occurred while attempting to obtain space. |
CPF1F41 E | Severe error occurred while addressing parameter list. |
CPF227A E | Certificate type is not valid. |
CPF227B E | Certificate is not correct for the specified type. |
CPF3BFF E | Required option &1 is not available. |
CPF3CF1 E | Error code parameter not valid. |
CPF3CF2 E | Error(s) occurred during running of &1 API. |
CPF3C1D E | Length specified in parameter &1 not valid. |
CPF3C1E E | Required parameter &1 omitted. |
CPF3C21 E | Format name &1 is not valid. |
CPF3C36 E | Number of parameters, &1, entered for this API was not valid. |
CPF3C90 E | Literal value cannot be changed. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Top | Security APIs | APIs by category |