SafeDecodePrivateKey calls [encoding/pem.Decode] on the given input as long as it's within a sensible range for how large we expect a private key to be. The baseline is a 16k-bit RSA private key, which is larger than the maximum supported by cert-manager for key generation.
(b []byte)
| 184 | // how large we expect a private key to be. The baseline is a 16k-bit RSA private key, which is larger than the maximum |
| 185 | // supported by cert-manager for key generation. |
| 186 | func SafeDecodePrivateKey(b []byte) (*stdpem.Block, []byte, error) { |
| 187 | return safeDecodeInternal(b, GetGlobalSizeLimits().MaxPrivateKeySize) |
| 188 | } |
| 189 | |
| 190 | // SafeDecodeCSR calls [encoding/pem.Decode] on the given input as long as it's within a sensible range for |
| 191 | // how large we expect a single PEM-encoded PKCS#10 CSR to be. |
searching dependent graphs…