SSL services: Difference between revisions

No edit summary
Line 199: Line 199:


The input buffer size must match the size of [[#KeyAndCertParams]] (0x58-bytes).
The input buffer size must match the size of [[#KeyAndCertParams]] (0x58-bytes).
This generates a self-signed DER cert/key with algo sha256WithRSAEncryption, with the cert expiring in exactly 30 days from the begin-timestamp.
The first outbuf contains the cert, the second outbuf contains the key. The output u32s are the actual output size of the cert and key.
Sample cert:
  Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number: {...}
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN = {input}
        Validity
            Not Before: {...}
            Not After : {...}
        Subject: CN = {input}
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: {input bit-size}
                Modulus:
                    {...}
                Exponent: {input}
    Signature Algorithm: sha256WithRSAEncryption
    Signature Value:
        {...}


=== ISslConnection ===
=== ISslConnection ===
Line 1,051: Line 1,077:
| 0x0 || 0x4 || Must be value 1.
| 0x0 || 0x4 || Must be value 1.
|-
|-
| 0x4 || 0x4 || s32 Key size, in bytes.
| 0x4 || 0x4 || s32 Key size in bits.
|-
|-
| 0x8 || 0x8 || Public exponent, must be non-zero. Only the low 4-bytes are used.
| 0x8 || 0x8 || Public exponent, must be non-zero. Only the low 4-bytes are used.