In downloading, but no provide confirmation code #137

Open
opened 2024-12-31 02:35:05 +01:00 by septs · 3 comments
Contributor

I think "es10b_prepare_download" is not handling the confirmation code correctly

(*env)->CallVoidMethod(env, callback, on_state_update, download_state_downloading);
ret = es10b_prepare_download(ctx, _confirmation_code);
syslog(LOG_INFO, "es10b_prepare_download %d", ret);
if (ret < 0) {
ret = -ES10B_ERROR_REASON_UNDEFINED;
goto out;
}

I think "es10b_prepare_download" is not handling the confirmation code correctly https://gitea.angry.im/PeterCxy/OpenEUICC/src/commit/bcd1295a18e6a0b00f9752d0a516f870d517fff2/libs/lpac-jni/src/main/jni/lpac-jni/lpac-download.c#L112-L118
Owner

What I suspect is some sort of encoding issue here. Do we have an example of such a confirmation code that failed download?

What I suspect is some sort of encoding issue here. Do we have an example of such a confirmation code that failed download?
Author
Contributor
PrepareDownloadRequest ::= [33] SEQUENCE { -- Tag 'BF21'
    -- Signed information
    smdpSigned2 SmdpSigned2,
    -- tag '5F37'
    smdpSignature2 [APPLICATION 55] OCTET STRING,
    -- Hash of confirmation code
    hashCc Octet32 OPTIONAL,
    -- CERT.DPpb.ECDSA
    smdpCertificate Certificate
}

SmdpSigned2 ::= SEQUENCE {
    -- The TransactionID generated by the SM-DP+
    transactionId [0] TransactionId,
    -- Indicates if the Confirmation Code is required
    ccRequiredFlag BOOLEAN,
    -- otPK.EUICC.ECKA already used for binding the BPP, tag '5F49'
    bppEuiccOtpk [APPLICATION 73] OCTET STRING OPTIONAL
}

from https://www.gsma.com/solutions-and-impact/technologies/esim/wp-content/uploads/2020/06/SGP.22-v2.2.2.pdf#page=181

``` PrepareDownloadRequest ::= [33] SEQUENCE { -- Tag 'BF21' -- Signed information smdpSigned2 SmdpSigned2, -- tag '5F37' smdpSignature2 [APPLICATION 55] OCTET STRING, -- Hash of confirmation code hashCc Octet32 OPTIONAL, -- CERT.DPpb.ECDSA smdpCertificate Certificate } SmdpSigned2 ::= SEQUENCE { -- The TransactionID generated by the SM-DP+ transactionId [0] TransactionId, -- Indicates if the Confirmation Code is required ccRequiredFlag BOOLEAN, -- otPK.EUICC.ECKA already used for binding the BPP, tag '5F49' bppEuiccOtpk [APPLICATION 73] OCTET STRING OPTIONAL } ``` from https://www.gsma.com/solutions-and-impact/technologies/esim/wp-content/uploads/2020/06/SGP.22-v2.2.2.pdf#page=181
Author
Contributor
https://github.com/estkme-group/lpac/blob/0b81e8ab1454b3dd4db9e9103e71fa79d2ced5e2/euicc/es10b.c#L100-L105
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: PeterCxy/OpenEUICC#137
No description provided.