Certificate QML Value Type
This class represents a digital certificate used for package signing. More...
| Import Statement: | import QtApplicationManager.SystemUI |
| Since: | Qt 6.11 |
Properties
- fingerprints : variant
- keyUsages : Certificate.KeyUsages
- serialNumber : string
- subject : variant
- subjectAlternativeNames : list<string>
- valid : bool
- validityNotAfter : date
- validityNotBefore : date
Methods
- bool matchPackageId(string packageId)
- list<string> packageIds()
- object toVariant()
Detailed Description
The Certificate class encapsulates information about a digital certificate, including its subject, serial number, key usages, validity period, fingerprints, and bound package-ids.
While it does allow you to read-only access to the most important X509 certificate information, it does however not encapsulate the actual DER/ASN.1 encoded certificate blob.
For more information about X509 certificates, see RFC 5280.
See also Package Installation.
Property Documentation
fingerprints : variant
This property holds the fingerprints of the certificate as a map of hash algorithm names and their corresponding fingerprint values as hex-encoded strings: Currently, the supported hash algorithms names are:
SHA-1SHA-256
keyUsages : Certificate.KeyUsages
This property is an integer value representing the key usage of the certificate. The possible key usage flags are defined as enum and they follow the bit values given in RFC 5280:
- Certificate.DigitalSignature
- Certificate.NonRepudiation
- Certificate.KeyEncipherment
- Certificate.DataEncipherment
- Certificate.KeyAgreement
- Certificate.KeyCertSign
- Certificate.CRLSign
- Certificate.EncipherOnly
- Certificate.DecipherOnly
There are also two predefined combinations for common use cases within the application manager:
- Certificate.Store: Intended for store certificates used to sign packages for distribution via an application store. It combines DigitalSignature, NonRepudiation, KeyEncipherment, and EncipherOnly.
- Certificate.Developer: Intended for developer certificates used to sign packages during development and testing. It combines DigitalSignature, NonRepudiation, KeyEncipherment, and DecipherOnly.
You can use bitwise operations to check for specific key usage in the returned value.
serialNumber : string
The serial number of the certificate as hex-encoded string.
subject : variant
Returns the subject of the certificate as a map of attribute names and values. The attribute names follow the standard OID naming conventions, e.g. commonName instead of CN.
subjectAlternativeNames : list<string>
The subject alternative names (SANs) of the certificate. This is the "raw" value from the X509 certificate. The application manager post-processes these entries to extract bound package-ids.
See also packageIds.
valid : bool
This property holds whether the certificate is valid.
validityNotAfter : date
The validity end date for this certificate.
validityNotBefore : date
The validity start date for this certificate.
Method Documentation
bool matchPackageId(string packageId)
Returns true if the given packageId matches any of the package-ids the certificate is bound to or false otherwise.
list<string> packageIds()
This function returns the list of package-ids the certificate is bound to.
object toVariant()
Returns a QVariantMap representation of this Certificate object.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.