Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4af27ab3 authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Don't crash on unserializable certificates

parent 25e369a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line

buildscript {
    ext.kotlin_version = '1.1.4-2'
    ext.kotlin_version = '1.1.4-3'

    repositories {
        jcenter()
+7 −1
Original line number Diff line number Diff line
@@ -194,7 +194,13 @@ class CustomCertService: Service() {
            val id = msg.arg1

            val data = msg.data
            val cert = data.getSerializable(MSG_DATA_CERTIFICATE) as X509Certificate
            val cert = try {
                data.getSerializable(MSG_DATA_CERTIFICATE) as X509Certificate
            } catch(e: Exception) {
                // for instance: NotSerializableException wrapped in RuntimeException
                Constants.log.log(Level.SEVERE, "Couldn't handle certificate", e)
                return
            }

            val replyInfo = ReplyInfo(msg.replyTo, id)