Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Status Code Value is not properly parsed in mobileid-*.sh #80

Closed
FreddyKaiser opened this issue Dec 23, 2014 · 2 comments
Closed

Status Code Value is not properly parsed in mobileid-*.sh #80

FreddyKaiser opened this issue Dec 23, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@FreddyKaiser
Copy link
Contributor

The RES_RC=$(sed -n -e 's/.*<mss:StatusCode Value="\(.*\)"\/>.*/\1/p' $TMP.rsp) seems to have some side effects depending on the answers.

./mobileid-sign.sh -v +41795135971 "Test: Hello" en
OK with following details and checks:
 1) Transaction ID : AP.TEST.40310.4313 -> same as in request
    MSSP TransID   : h9nb2
 2) Signed by      : +41795135971 -> same as in request
 3) Signer         : subject= serialNumber=MIDCHE9AMU4FHEH0,CN=MIDCHE9AMU4FHEH0:PN,C=CH
                     issuer= C=ch,O=Swisscom,OU=Digital Certificate Services,CN=Swisscom TEST Rubin CA 2
                     validity= notBefore=Dec 22 12:17:45 2014 GMT notAfter=Dec 22 12:17:45 2017 GMT
                     CRL check= OK
                     OCSP check= good
 4) Signed Data    : Test: Hello -> Decode and verify: success and same as in request
 5) Status code    : 500"/><mss:StatusMessage>SIGNATURE</mss:StatusMessage><mss:StatusDetail><fi:ServiceResponses><fi:ServiceResponse><fi:Description><mss:mssURI>http://mid.swisscom.ch/as#subscriberInfo</mss:mssURI></fi:Description><ns1:SubscriberInfo xmlns:ns1="http://mid.swisscom.ch/TS102204/as/v1.0"><ns1:Detail id="1901" value="22801 with exit 0
    Status details : SIGNATURE

Error with:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <MSS_SignatureResponse xmlns="">
      <mss:MSS_SignatureResp xmlns:mss="http://uri.etsi.org/TS102204/v1.1.2#" xmlns:fi="http://mss.ficom.fi/TS102204/v1.0.0#" MajorVersion="1" MinorVersion="1" MSSP_TransID="h9nb3">
        <mss:AP_Info AP_ID="mid://dev.swisscom.ch" AP_TransID="AP.TEST.40410.4413" AP_PWD="disabled" Instant="2014-12-22T13:25:54.000+01:00"/>
        <mss:MSSP_Info Instant="2014-12-22T13:26:14.841+01:00">
          <mss:MSSP_ID>
            <mss:URI>http://mid.swisscom.ch/</mss:URI>
          </mss:MSSP_ID>
        </mss:MSSP_Info>
        <mss:MobileUser>
          <mss:MSISDN>+41795135971</mss:MSISDN>
        </mss:MobileUser>
        <mss:MSS_Signature>
       <mss:Base64Signature>MII...</mss:Base64Signature>
        </mss:MSS_Signature>
        <mss:SignatureProfile>
          <mss:mssURI>http://mid.swisscom.ch/MID/v1/AuthProfile1</mss:mssURI>
        </mss:SignatureProfile>
        <mss:Status>
          <mss:StatusCode Value="500"/>
          <mss:StatusMessage>SIGNATURE</mss:StatusMessage>
          <mss:StatusDetail>
            <fi:ServiceResponses>
              <fi:ServiceResponse>
                <fi:Description>
                  <mss:mssURI>http://mid.swisscom.ch/as#subscriberInfo</mss:mssURI>
                </fi:Description>
                <ns1:SubscriberInfo xmlns:ns1="http://mid.swisscom.ch/TS102204/as/v1.0">
                  <ns1:Detail id="1901" value="22801"/>
                </ns1:SubscriberInfo>
              </fi:ServiceResponse>
            </fi:ServiceResponses>
          </mss:StatusDetail>
        </mss:Status>
      </mss:MSS_SignatureResp>
    </MSS_SignatureResponse>
  </soapenv:Body>
</soapenv:Envelope>

but fine with:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <MSS_SignatureResponse xmlns="">
      <mss:MSS_SignatureResp xmlns:mss="http://uri.etsi.org/TS102204/v1.1.2#" xmlns:fi="http://mss.ficom.fi/TS102204/v1.0.0#" MajorVersion="1" MinorVersion="1" MSSP_TransID="h9nb4">
        <mss:AP_Info AP_ID="mid://dev.swisscom.ch" AP_TransID="AP.TEST.40514.4517" AP_PWD="disabled" Instant="2014-12-22T13:26:50.000+01:00"/>
        <mss:MSSP_Info Instant="2014-12-22T13:27:16.902+01:00">
          <mss:MSSP_ID>
            <mss:URI>http://mid.swisscom.ch/</mss:URI>
          </mss:MSSP_ID>
        </mss:MSSP_Info>
        <mss:MobileUser>
          <mss:MSISDN>+41795135971</mss:MSISDN>
        </mss:MobileUser>
        <mss:MSS_Signature>
          <mss:Base64Signature>MIIH</mss:Base64Signature>
        </mss:MSS_Signature>
        <mss:SignatureProfile>
          <mss:mssURI>http://mid.swisscom.ch/MID/v1/AuthProfile1</mss:mssURI>
        </mss:SignatureProfile>
        <mss:Status>
          <mss:StatusCode Value="500"/>
          <mss:StatusMessage>SIGNATURE</mss:StatusMessage>
        </mss:Status>
      </mss:MSS_SignatureResp>
    </MSS_SignatureResponse>
  </soapenv:Body>
</soapenv:Envelope>
@FreddyKaiser FreddyKaiser self-assigned this Dec 23, 2014
@FreddyKaiser FreddyKaiser added this to the 2014.Winter milestone Dec 23, 2014
FreddyKaiser added a commit that referenced this issue Dec 23, 2014
@FreddyKaiser FreddyKaiser assigned phaupt and unassigned FreddyKaiser Dec 23, 2014
@FreddyKaiser
Copy link
Contributor Author

Can you cross-check this and verify correctness

@phaupt
Copy link
Member

phaupt commented Dec 24, 2014

Looks all fine to me and tests were successful.

@phaupt phaupt closed this as completed Dec 24, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants