background image

 

HUAWEI MU509-b HSDPA LGA Module   
SSL Application Guide 

Configure SSL 

 

Issue 01 (2014-10-10) 

Huawei Proprietary and Confidential 

Copyright © Huawei Technologies Co., Ltd. 

13 

 

OmQyOgogICAgICAgICAgICAgICAgICAgIGI3OjZmOmIxOjVhOjE3OmQ3OjM4
Ojk5OjA4OmZlOjkzOjU4OjZmOmZlOmMzOgogICAgICAgICAgICAgICAgICAgID
EzOjQ5OjA4OjE2OjBiOmE3OjRkOjY3OjAwOjUyOjMxOjY3OjIzOjRlOjk4OgogIC
AgICAgICAgICAgICAgICAgIGVkOjUxOjQ1OjFkOmI5OjA0OmQ5OjBiOmVjOmQ
4OjI4OmIzOjRiOmJkOmVkOgogICAgICAgICAgICAgICAgICAgIDM2Ojc5CiAgIC
AgICAgICAgICAgICBFeHBvbmVudDogNjU1MzcgKDB4MTAwMDEpCiAgICAgIC
AgWDUwOXYzIGV4dGVuc2lvbnM6CiAgICAgICAgICAgIFg1MDl2MyBTdWJqZ
WN0IEtleSBJZGVudGlmaWVyOiAKICAgICAgICAgICAgICAgIDI3OjhFOjY3OjEx
Ojc0OkMzOjI2OjFEOjNGOkVEOjMzOjYzOkIzOkE0OkQ4OjFEOjMwOkU1OkU4
OkQ1CiAgICAgICAgICAgIFg1MDl2MyBBdXRob3JpdHkgS2V5IElkZW50aWZpZ
XI6IAogICAgICAgICAgICAgICAga2V5aWQ6Mjc6OEU6Njc6MTE6NzQ6QzM6Mj
Y6MUQ6M0Y6RUQ6MzM6NjM6QjM6QTQ6RDg6MUQ6MzA6RTU6RTg6RDUK
ICAgICAgICAgICAgICAgIERpck5hbWU6L0M9VVMvU1Q9TW9udGFuYS9" 

OK 

AT^SSLMNG=1,1,0,"ca-
cert2.pem",6,7,"MPUJvemVtYW4vTz1TYXd0b290aC9PVT1Db25zdWx0aW5nL
0NOPXd3dy55YXNzbC5jb20vZW1haWxBZGRyZXNzPWluZm9AeWFzc2wuY29
tCiAgICAgICAgICAgICAgICBzZXJpYW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2ODplNTo0ZTo0M
To2Mjo2ZTpkMzo2Zjo2MDo0Zjo0YjoyNzpkZTpjZjoKICAgICAgICAxODowNzpm
MToxMzo1ZDpjYjozZjphOToyNTo0NDpkYTo1Mjo1YzpjODowNDplMTo1NjoxMjo
KICAgICAgICBmNToyYTo5MDo0ZTpkMTplMjphZjowMTpiNToyMzphMTplYzoz
MTpkYTo3Yjo2Mzo2OTpjNDoKICAgICAgICBiODpmMzplNzpjZTphMTozZDpjM
DpkYjo2ZDpmMzpiMjpkOTo0NjpjODo5ZjpjMzpiODo3MDoKICAgICAgICA1YTox
Zjo3ZjpjYQo=" 

OK 

 

Store client certificate: 

AT^SSLMNG=1,0,0,"client-
cert.pem",1,7,"Q2VydGlmaWNhdGU6CiAgICBEYXRhOgogICAgICAgIFZlcnNpb
246IDMgKDB4MikKICAgICAgICBTZXJpYWwgTnVtYmVyOgogICAgICAgICAgIC
A4Nzo0YTo3NTpiZTo5MTo2NjpkODozZAogICAgICAgIFNpZ25hdHVyZSBBbGd
vcml0aG06IHNoYTFXaXRoUlNBRW5jcnlwdGlvbgogICAgICAgIElzc3VlcjogQz1
VUywgU1Q9T3JlZ29uLCBMPVBvcnRsYW5kLCBPPXlhU1NMLCBPVT1Qcm9n
cmFtbWluZywgQ049d3d3Lnlhc3NsLmNvbS9lbWFpbEFkZHJlc3M9aW5mb0B5Y
XNzbC5jb20KICAgICAgICBWYWxpZGl0eQogICAgICAgICAgICBOb3QgQmVm

Содержание MU509-b

Страница 1: ...HUAWEI MU509 b HSDPA LGA Module V100R003 SSL Application Guide Issue 01 Date 2014 10 10 ...

Страница 2: ...cations contained in this manual without prior notice and without any liability DISCLAIMER ALL CONTENTS OF THIS MANUAL ARE PROVIDED AS IS EXCEPT AS REQUIRED BY APPLICABLE LAWS NO WARRANTIES OF ANY KIND EITHER EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE MADE IN RELATION TO THE ACCURACY RELIABILITY OR CONTENTS OF ...

Страница 3: ... Application Guide About This Document Issue 01 2014 10 10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co Ltd 3 About This Document Revision History Document Version Date Chapter Descriptions 01 2014 10 10 Creation ...

Страница 4: ... Configuring or Activating Context 6 2 3 SSL 7 2 3 1 Cipher Suites 8 2 3 2 Certificates 8 3 Configure SSL 9 3 1 Initialize SSL Library 9 3 2 Enable Secure CyaSSL Channel 9 3 3 Configure CyaSSL Socket 10 3 4 Manage Certificate 10 4 Work with SSL 18 4 1 Open a Secure Socket 18 4 2 Socket Connection Status 19 4 3 Exchange Data Through a Secure Socket 20 4 3 1 Transmit Data 20 4 3 2 Receive Data 20 4 ...

Страница 5: ...owledge in wireless technology as well as in AT commands A basic knowledge of SSL and Transport Layer Security TLS security protocol is also needed For protocol details refer to RFC 2246 The TLS Protocol Version 1 0 For details about certificates refer to RFC 2459 X509v3 1 3 CyaSSL CyaSSL library is the third party SSL library for building security functionality into embedded devices with minimal ...

Страница 6: ...ation of a PDP context is needed First of all context parameters have to be set They consist in a set of information identifying the internet entry point interface provided by the ISP This can be done using the AT CGDCONT command AT CGDCONT cid PDP_type APN PDP_addr d_comp h_com p Where cid the PDP Context Identifier a numeric parameter which specifies a particular PDP context definition PDP_type ...

Страница 7: ...ntly Other values are reserved If no h_comp is included it is equivalent to the effect that the h_comp is 0 Example To configure APN AT CGDCONT 1 IP mhahuawei1 com OK To check the APN settings AT CGDCONT CGDCONT 1 IP mhahuawei1 com 0 0 OK To get the signal strength AT CSQ CSQ 28 99 OK 31 is the strongest 0 is the weakest and 99 for none To get the registered network AT COPS COPS 0 0 Terminal MHA N...

Страница 8: ...e digests The supported cipher suites are listed below Value Cipher_suites 0 All supported Ciphers 1 TLS_RSA_WITH_RC4_128_SHA 2 TLS_RSA_WITH_RC4_128_MD5 3 TLS_RSA_WITH_NULL_SHA 4 TLS_RSA_WITH_NULL_SHA256 5 TLS_RSA_WITH_AES_256_CBC_SHA 6 TLS_RSA_WITH_AES_128_CBC_SHA 7 TLS_RSA_WITH_AES_128_CBC_SHA256 8 TLS_RSA_WITH_AES_256_CBC_SHA256 9 TLS_RSA_WITH_3DES_EDE_CBC_SHA 10 TLS_DHE_RSA_WITH_AES_256_CBC_SH...

Страница 9: ...zed Once SSL service task is created CyaSSL library is initialized internally and a CyaSSL context is created 3 2 Enable Secure CyaSSL Channel The first step to be done in order to exchange data through an SSL socket is to enable the secure socket This can be done using the AT command AT SSLEN AT SSLEN SSL_id Enable Encode_ok Where SSL_id must be set to 1 for security socket ID available Enable in...

Страница 10: ...o security data is needed at all 1 Server authentication mode CA Certificate storage is needed the most common case 2 Server or Client authentication mode CA Certificate server Certificate client and Private Key client are needed Example CyaSSL socket configuration AT SSLCFG 1 60 0 1 OK 3 4 Manage Certificate Certificate management can be done using the AT command AT SSLMNG AT SSLMNG SSL_id data_t...

Страница 11: ...VZWE56YkM1amIyMHhIVEFiQmdrcWhra Uc5dzBCQ1FFV0RtbHVabTlBZVdGemMyd3VZMjl0TUI0WERURXgKTVRBeU5 ERTRNVGd4TlZvWERURTBNRGN5TURFNE1UZ3hOVm93Z1pBeEN6QUpCZ 05WQkFZVEFsVlRNUkF3RGdZRApWUVFJRXdkTmIyNTBZVzVoTVJBd0RnW URWUVFIRXdkQ2IzcGxiV0Z1TVJFd0R3WURWUVFLRXdoVFlYZDBiMjkwCmF ERVRNQkVHQTFVRUN4TUtRMjl1YzNWc2RHbHVaekVXTUJRR0ExVUVBeE1 OZDNkM0xubGhjM05zTG1OdmJURWQKTUJzR0NTcUdTSWIzRFFFSkFSWU9 hVzVtYjBCNVlYTnpiQzVqYjI...

Страница 12: ...0aW5nLCBDTj13d3cueWFzc2wuY29tL2VtYWl sQWRkcmVzcz1pbmZvQHlhc3NsLmNvbQogICAgICAgIFN1YmplY3QgUHVibGlj IEtleSBJbmZvOgogICAgICAgICAgICBQdWJsaWMgS2V5IEFsZ29yaXRobTogcn NhRW5jcnlwdGlvbgogICAgICAgICAgICBSU0EgUHVibGljIEtleTogKDIwNDggYm l0KQogICAgICAgI OK AT SSLMNG 1 1 0 ca cert2 pem 4 7 CAgICAgICAgTW9kdWx1cyAoMjA0OCBiaXQpOgogICAgICAgI CAgICAgICAgICAgIDAwOmJmOjBjOmNhOjJkOjE0OmIyOjFlOjg0OjQyOjViOm NkOjM4OjFm...

Страница 13: ...zoxYzo4OTo2Zjo5ZTplZTpiMzo5ZDo3NzozZTo4OToyM Do3NjphMzplNjoKICAgICAgICBlODo4NjoxNToyMTpkYjplMjozMzpiMjozNDpkNT pkMDo5ZjpmMzpjMTphNDo4Nzo5Mjo1YzoKICAgICAgICBmOTpkMTpmZjozMD oyZjo4ZTowMzpiYzpiMzozYzowYzozMjphMzo5MDo1ZjoxYTo5MDoxZToKICAgI CAgICBhZjo5ZDpmMzo5ZTpkNzowNzowMjphOTo3ZDoyNzo2Njo2MzoyZjphZjo xODpkNzphYzoxODoKICAgICAgICA5ODo4Yzo4Mzo4ZjozODpmMzowYjphYzo zNjoxMDo3NTpmYjpjYTo3NjoxMzo1MDo1YjowMjo...

Страница 14: ...0YToz NTplNDplMTpjZTo5NjpkZjoxYjo3ZToKICAgICAgICAgICAgICAgICAgICBiZjo0ZT o5NzpkMDoxMDplODphODowODozMDo4MTphZjoyMDowYjo0MzoxNDoKICAg ICAgICAgICAgICAgICAgICBjNTo3NDo2NzpiNDozMjo4Mjo2Zjo4ZDo4NjpjMjo4 ODo0MDo5OTozNjo4MzoKICAgICAgICAgICAgICAgICAgICBiYToxZTo0MDo3Mj oyMjoxNzpkNzo1Mjo2NToyNDo3MzpiMDpjZTplZjoxOToKICAgICAgICAgICAgIC AgICAgICBjZDphZTpmZjo3ODo2Yzo3YjpjMDoxMjowMzpkNDo0ZTo3MjowZDo 1MDo2ZDoKICAg...

Страница 15: ...ElGSUNBVEUtLS0tLQpN SUlFbURDQ0E0Q2dBd0lCQWdJSkFJZEtkYjZSWnRnOU1BMEdDU3F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JVkFURSBLRVktLS0tLQo OK ...

Страница 18: ...SSLO SSL_id remote_IP remote_port mode TimeOut Where SSL_id SSL socket ID 1 Secure socket connection 0 Normal socket connection remote_IP string type IP address IP or hostname of the server remote_port port the value ranges from 1 to 65535 remote port of the server usually 443 mode async mode optional it will take the value as 0 by default 0 Sync mode 1 Async mode For Sync mode data will be receiv...

Страница 19: ...a GVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxva GVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxva GVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxva GVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxva GVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxvaGVsbG9oZWxsb2hlbGxva GU 4 2 Socket Connection Status An AT command is provided to know the current connection stat...

Страница 20: ...pe the data which are needed to transmit 1 1024 bytes If the encode_ok is set to 1 then the input buffer should be 768 bytes of raw data If the encode_ok is set to 0 then the input buffer should be 1024 bytes of raw data If encode_ok in AT SSLEN command is 1 then it should be Base 64 encoded format data Otherwise it should be normal plain data TimeOut maximum blocking timeout in seconds It is an o...

Страница 21: ...RX and for normal socket RX the default Timeout value 60 seconds will be used LengthOfRec the actual number of bytes received Received_data the received data If encode_ok in AT SSLEN command is 1 then it is Base 64 encoded format data the length of the Received_data is differ from LengthOfRec because the Received_data is in Base 64 encoded format Otherwise the actual plain data will be displayed E...

Страница 22: ...o Requirement Description 1 AT SSLEN SSL_id Enable enc ode_ok Enable or disable a secure or normal socket 2 AT SSLCFG SSL_id TimeOut ciphe rs_suit scur_level Configure the properties of secure socket 3 AT SSLSTAT SSL_id Query the status of a secure or normal socket 4 AT SSLO SSL_id remote_IP re mote_port mode TimeOut Create and open a secure or normal socket 5 AT SSLTX SSL_id data_buffer TimeOut S...

Страница 23: ...ted format Numerical Format AT CMEE 1 Verbose Format AT CMEE 2 100 Unknown Error 2101 Operations failed due to system error 2102 Socket not enabled 2103 Socket not connected 2104 Socket already enabled 2105 Socket already connected 2107 SSL error during handshake 2109 Fail to connect specified address 2110 Invalid arguments 2111 Certification error 2112 Invalid Operation 2113 Certificate maximum l...

Страница 24: ...iations Acronym or Abbreviation Expansion CA Certification Authority FTP File Transfer Protocol GGSN Gateway GPRS Support Node HTTP Hypertext Transfer Protocol LDAP Lightweight Directory Access Protocol PDP Packet Data Protocol SMTP Simple Mail Transfer Protocol REX Real Time Executive SSL Secure Socket Layer TCP Transmission Control Protocol TLS Transport Layer Security ...

Отзывы: