mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-228410 Avoid the NPE when a secret key has multiple user ids attached to it
GitOrigin-RevId: 6a10c3a5dc7c76bb790048ebf6638f15b88765c4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
13fc4f69e5
commit
3d07ac359e
@@ -34,6 +34,9 @@ internal class Pgp(private val gpgTool: GpgToolWrapper = createGpg()) {
|
||||
capabilities = fields.next()
|
||||
}
|
||||
|
||||
/*
|
||||
* There may be multiple user identities ("uid") following a single secret key ("sec").
|
||||
*/
|
||||
"uid" -> {
|
||||
// a potential letter 'D' to indicate a disabled key
|
||||
// e :: Encrypt
|
||||
@@ -46,8 +49,6 @@ internal class Pgp(private val gpgTool: GpgToolWrapper = createGpg()) {
|
||||
// The value is quoted like a C string to avoid control characters (the colon is quoted =\x3a=).
|
||||
result.add(PgpKey(keyId!!, fields.next().replace("=\\x3a=", ":")))
|
||||
}
|
||||
keyId = null
|
||||
capabilities = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user