55 #include <QtCore/QJniEnvironment>
56 #include <QtCore/QJniObject>
66 QJniObject certificates = QJniObject::callStaticObjectMethod(
"org/qtproject/qt/android/QtNative",
69 if (!certificates.isValid())
70 return certificateData;
73 jobjectArray jcertificates = certificates.object<jobjectArray>();
74 const jint nCertificates = env->GetArrayLength(jcertificates);
75 certificateData.
reserve(
static_cast<int>(nCertificates));
77 for (
int i = 0;
i < nCertificates; ++
i) {
78 jbyteArray jCert =
static_cast<jbyteArray
>(env->GetObjectArrayElement(jcertificates,
i));
79 const uint sz = env->GetArrayLength(jCert);
80 jbyte *
buffer = env->GetByteArrayElements(jCert, 0);
83 env->ReleaseByteArrayElements(jCert,
buffer, JNI_ABORT);
84 env->DeleteLocalRef(jCert);
87 return certificateData;
small capitals from c petite p scientific i
[1]
The QJniEnvironment class provides access to the JNI Environment (JNIEnv).
A convenience wrapper around the Java Native Interface (JNI).
void reserve(qsizetype size)
void append(parameter_type t)
QList< QByteArray > fetchSslCertificateData()
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()