# 22. Virtuoso Functions Guide - get_certificate_info

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
dav add & update fun...
dav manipulation fun...
dav search functions
dav_exp
lfs_exp
serv_queue_top
vhost_define
vhost_remove
webdav users & group...
client_attr
connection_get
connection_id
connection_is_dirty
connection_set
connection_vars
connection_vars_set
dbname
ftp_get
ftp_ls
ftp_put
get_certificate_info
get_keyword
get_keyword_ucase
http
http_acl_get
http_body_read
http_client
http_client_ip
http_debug_log
http_enable_gz
http_file
http_flush
http_get
http_header
http_header_get
http_kill
http_listen_host
http_map_get
http_map_table
http_param
http_path
http_pending_req
http_physical_path
http_proxy
http_request_get
http_request_header
http_request_status
http_rewrite
http_root
http_url
http_value
http_xslt
ses_connect
ses_disconnect
ses_read_line
ses_write
tcpip_gethostbyaddr
tcpip_gethostbyname
vsp_calculate_digest
wsdl_import_udt
XML
XPATH & XQUERY
Functions Index

## get_certificate_info

Returns information about the current client X509 certificate
integer or stringget_certificate_info (in typeinteger, in cert_or_key_namevarchar, in in_formatint, in passwdvarchar, in ext_oidvarchar);
Description

This function will return information about the current client X509 certificate (if successfully verified). If there is no valid X509 certificate or the requested information is not available it will return NULL.

If the optional cert_or_key_name is supplied it should contain a encoded certificate (by default format is PEM). The certificate info is read from the first certificate in that string.

If the optional cert_or_key_name is supplied and in_format is equal to 3 (integer) the function will try to retrieve the certificate registered in the current user's key store by name contained in cert_or_key_name.

Parameters
type – type must be an integer. It can be one of the following values:

- 1 - return the certificate serial number as an integer
- 2 - return the certificate subject name as a string
- 3 - return the certificate issuer name as a string
- 4 - return the certificate validity period start date as a string
- 5 - return the certificate validity period end date as a string
- 6 - return the certificate fingerprint
- 7 - return the certificate extension value by OID
- 8 - return the certificate name of the key from current user store

cert_or_key_name – A string containing an encoded X.509 certificate or name of a key from current user store.
in_format – This is to designate encoding type of the value 'cert_or_key_name'

- 0 (default) - PEM
- 1 - DER (raw)
- 2 - PKCS#12
- 3 - the 'cert_or_key_name' is a name of a key from user's key store

passwd – Password to unlock PKCS#12 encoded certificate
ext_oid – X.509 extention object identifier
Return Types

The requested information or NULL if the certificate is found to be invalid.