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. 

11 

 

 

<action>: 

0: Store certificate 

1: Delete certificate 

2: Load certificate 

 

<file_name>: 

the file name used for storing the certificate. The maximum length 

of the file name is 255. 

 

<package_id>:

 

package identification number (1

–10). 

 

<total_no_of_packages>: total number of packages after splitting the Base 64 
encoded format certificate data of each package of size maximum of 1024 bytes 
(1

–10). 

 

<

cert_info>: string type, broken certificate package (converted into Base 64 

encoded format before splitting the package) data (1

–1024 bytes). 

As we are decoding the certificates only after the last package is received, each 
package does not need to be multiple of 4. 

 

<password>: string type, password for private key. 

Example 

 

Store CA certificate: 

AT^SSLMNG=1,1,0,"ca-
cert2.pem",1,7,"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVuakND
QTRhZ0F3SUJBZ0lKQU9uUXAxOTVKZlE4TUEwR0NTcUdTSWIzRFFFQkJRV
UFNSUdRTVFzd0NRWUQKVlFRR0V3SlZVekVRTUE0R0ExVUVDQk1IVFc5dW
RHRnVZVEVRTUE0R0ExVUVCeE1IUW05NlpXMWhiakVSTUE4RwpBMVVFQ
2hNSVUyRjNkRzl2ZEdneEV6QVJCZ05WQkFzVENrTnZibk4xYkhScGJtY3hGak
FVQmdOVkJBTVREWGQzCmR5NTVZWE56YkM1amIyMHhIVEFiQmdrcWhra
Uc5dzBCQ1FFV0RtbHVabTlBZVdGemMyd3VZMjl0TUI0WERURXgKTVRBeU5
ERTRNVGd4TlZvWERURTBNRGN5TURFNE1UZ3hOVm93Z1pBeEN6QUpCZ
05WQkFZVEFsVlRNUkF3RGdZRApWUVFJRXdkTmIyNTBZVzVoTVJBd0RnW
URWUVFIRXdkQ2IzcGxiV0Z1TVJFd0R3WURWUVFLRXdoVFlYZDBiMjkwCmF
ERVRNQkVHQTFVRUN4TUtRMjl1YzNWc2RHbHVaekVXTUJRR0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3Foa2lHCjl3MEJDUUVXRG1sdVptOUFlV0Z6YzJ3dVkyOXRnZ2tBNmRDblgza2

Содержание 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 o5NzpkMDoxMDplODphODowODozMDo4MTphZjoyMDowYjo0MzoxND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OFlpL0xWQlhRMHpZT3FrZ lg...

Страница 17: ...ogies Co Ltd 17 yQUIvQzhDZ1lBUjBFdlBHMmU1bnhCMVI0WmxyakhDeGpDc1dRWlEyUSsxY0 FiMzhOUElZbnlvMm03MklUL1QKZjEvcWlxcy OK AT SSLMNG 1 2 0 client key pem 3 3 8yU3BlODFIU3dqQTM0eTJqZFEwZVRTRTAxVmR3WEltL2N1eE tibWpWelJoME0wNk1Pa1dQNXBaQQo2MlA1R1lZNlVkMkpTN0R6K1o5ZEtKVT R2aldyeWx6bmsxTTBvVVZkRXpsbFFrYWhuODMxdnc9PQotLS0tLUVORCBSU 0EgUFJJVkFURSBLRVktLS0tLQo 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 ...

Отзывы: