Kitura / Kitura/BlueRSA

Bug: Key creation failure if byte 27 of key data is 0x30

Open
#52 2 comments 1 reaction 2 assignees Claimed by @adam-rocska View on GitHub
Dominant language
Swift
Stars
136
Forks
62
PR merge metrics
No merged PRs in 30d

Description

If you try to create an RSA key with data where byte 27 happens to be 0x30, key creation fails.

I tracked this down to an unsafe assumption in the stripX509CertificateHeader function:
https://github.com/IBM-Swift/BlueRSA/blob/master/Sources/CryptorRSA/CryptorRSAUtilities.swift#L228
which is called here:
https://github.com/IBM-Swift/BlueRSA/blob/master/Sources/CryptorRSA/CryptorRSAKey.swift#L624

I found this while debugging intermittent test failures in the CI. The symptom on Linux is a crash because we don't handle a failure from OpenSSL properly - I have a fix for that in the issue.swift51 branch, but I haven't figured out what to do about this problem yet.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.