How to Apply App Certificates: Difference between revisions

From wizarPOS
No edit summary
Line 45: Line 45:
List of 2 letter country codes.
List of 2 letter country codes.


AF - Afghanistan  
 
AX - Aland Islands  
* AF - Afghanistan  
AL - Albania  
* AX - Aland Islands  
DZ - Algeria  
* AL - Albania  
AS - American Samoa  
* DZ - Algeria  
AD - Andorra  
* AS - American Samoa  
AO - Angola  
* AD - Andorra  
AI - Anguilla  
* AO - Angola  
AQ - Antarctica  
* AI - Anguilla  
AG - Antigua and Barbuda  
* AQ - Antarctica  
AR - Argentin a  
* AG - Antigua and Barbuda  
AM - Armenia  
* AR - Argentin a  
AW - Aruba  
* AM - Armenia  
AC - Ascension Island  
* AW - Aruba  
AU - Australia  
* AC - Ascension Island  
AT - Austria  
* AU - Australia  
AZ - Azerbaijan  
* AT - Austria  
BS - Bahamas  
* AZ - Azerbaijan  
BH - Bahrain  
* BS - Bahamas  
BB - Barbados  
* BH - Bahrain  
BD - Bangladesh  
* BB - Barbados  
BY - Belarus  
* BD - Bangladesh  
BE - Belgium  
* BY - Belarus  
BZ - Belize  
* BE - Belgium  
BJ - Benin  
* BZ - Belize  
BM - Bermuda  
* BJ - Benin  
BT - Bhutan  
* BM - Bermuda  
BW - Botswana  
* BT - Bhutan  
BO - Bolivia  
* BW - Botswana  
BA - Bosnia and Herzegovin a  
* BO - Bolivia  
BV - Bouvet Island  
* BA - Bosnia and Herzegovin a  
BR - Brazil  
* BV - Bouvet Island  
IO - British Indian Ocean Territory  
* BR - Brazil  
BN - Brunei Darussalam  
* IO - British Indian Ocean Territory  
BG - Bulgaria  
* BN - Brunei Darussalam  
BF - Burkin a Faso  
* BG - Bulgaria  
BI - Burundi  
* BF - Burkin a Faso  
KH - Cambodia  
* BI - Burundi  
CM - Cameroon  
* KH - Cambodia  
CA - Canada  
* CM - Cameroon  
CV - Cape Verde  
* CA - Canada  
KY - Cayman Islands  
* CV - Cape Verde  
CF - Central African Republic  
* KY - Cayman Islands  
TD - Chad  
* CF - Central African Republic  
CL - Chile  
* TD - Chad  
CN - Chin a  
* CL - Chile  
CX - Christmas Island  
* CN - Chin a  
CC - Cocos (Keeling) Islands  
* CX - Christmas Island  
CO - Colombia  
* CC - Cocos (Keeling) Islands  
KM - Comoros  
* CO - Colombia  
CG - Congo  
* KM - Comoros  
CD - Congo, Democratic Republic  
* CG - Congo  
CK - Cook Islands  
* CD - Congo, Democratic Republic  
CR - Costa Rica  
* CK - Cook Islands  
CI - Cote D'Ivoire (Ivory Coast)  
* CR - Costa Rica  
HR - Croatia (Hrvatska)  
* CI - Cote D'Ivoire (Ivory Coast)  
CU - Cuba  
* HR - Croatia (Hrvatska)  
CY - Cyprus  
* CU - Cuba  
CZ - Czech Republic  
* CY - Cyprus  
CS - Czechoslovakia (former)  
* CZ - Czech Republic  
DK - Denmark  
* CS - Czechoslovakia (former)  
DJ - Djibouti  
* DK - Denmark  
DM - Dominica  
* DJ - Djibouti  
DO - Dominican Republic  
* DM - Dominica  
TP - East Timor  
* DO - Dominican Republic  
EC - Ecuador  
* TP - East Timor  
EG - Egypt  
* EC - Ecuador  
SV - El Salvador  
* EG - Egypt  
GQ - Equatorial Guinea  
* SV - El Salvador  
ER - Eritrea  
* GQ - Equatorial Guinea  
EE - Estonia  
* ER - Eritrea  
ET - Ethiopia  
* EE - Estonia  
FK - Falkland Islands (Malvin as)  
* ET - Ethiopia  
FO - Faroe Islands  
* FK - Falkland Islands (Malvin as)  
FJ - Fiji  
* FO - Faroe Islands  
FI - Finland  
* FJ - Fiji  
FR - France  
* FI - Finland  
FX - France, Metropolitan  
* FR - France  
GF - French Guiana  
* FX - France, Metropolitan  
PF - French Polynesia  
* GF - French Guiana  
TF - French Southern Territories  
* PF - French Polynesia  
MK - F.Y.R.O.M. (Macedonia)  
* TF - French Southern Territories  
GA - Gabon  
* MK - F.Y.R.O.M. (Macedonia)  
GM - Gambia  
* GA - Gabon  
GE - Georgia  
* GM - Gambia  
DE - Germany  
* GE - Georgia  
GH - Ghana  
* DE - Germany  
GI - Gibraltar  
* GH - Ghana  
GB - Great Britain (UK)  
* GI - Gibraltar  
GR - Greece  
* GB - Great Britain (UK)  
GL - Greenland  
* GR - Greece  
GD - Grenada  
* GL - Greenland  
GP - Guadeloupe  
* GD - Grenada  
GU - Guam  
* GP - Guadeloupe  
GT - Guatemala  
* GU - Guam  
GN - Guinea  
* GT - Guatemala  
GW - Guinea-Bissau  
* GN - Guinea  
GY - Guyana  
* GW - Guinea-Bissau  
HT - Haiti  
* GY - Guyana  
HM - Heard and McDonald Islands  
* HT - Haiti  
HN - Honduras  
* HM - Heard and McDonald Islands  
HK - Hong Kong  
* HN - Honduras  
HU - Hungary  
* HK - Hong Kong  
IS - Iceland  
* HU - Hungary  
IN - India  
* IS - Iceland  
ID - Indonesia  
* IN - India  
IR - Iran  
* ID - Indonesia  
IQ - Iraq  
* IR - Iran  
IE - Ireland  
* IQ - Iraq  
IL - Israel  
* IE - Ireland  
IM - Isle of Man  
* IL - Israel  
IT - Italy  
* IM - Isle of Man  
JE - Jersey  
* IT - Italy  
JM - Jamaica  
* JE - Jersey  
JP - Japan  
* JM - Jamaica  
JO - Jordan  
* JP - Japan  
KZ - Kazakhstan  
* JO - Jordan  
KE - Kenya  
* KZ - Kazakhstan  
KI - Kiribati  
* KE - Kenya  
KP - Korea (North)  
* KI - Kiribati  
KR - Korea (South)  
* KP - Korea (North)  
KW - Kuwait  
* KR - Korea (South)  
KG - Kyrgyzstan  
* KW - Kuwait  
LA - Laos  
* KG - Kyrgyzstan  
LV - Latvia  
* LA - Laos  
LB - Lebanon  
* LV - Latvia  
LI - Liechtenstein  
* LB - Lebanon  
LR - Liberia  
* LI - Liechtenstein  
LY - Libya  
* LR - Liberia  
LS - Lesotho  
* LY - Libya  
LT - Lithuania  
* LS - Lesotho  
LU - Luxembourg  
* LT - Lithuania  
MO - Macau  
* LU - Luxembourg  
MG - Madagascar  
* MO - Macau  
MW - Malawi  
* MG - Madagascar  
MY - Malaysia  
* MW - Malawi  
MV - Maldives  
* MY - Malaysia  
ML - Mali  
* MV - Maldives  
MT - Malta  
* ML - Mali  
MH - Marshall Islands  
* MT - Malta  
MQ - Martinique  
* MH - Marshall Islands  
MR - Mauritania  
* MQ - Martinique  
MU - Mauritius  
* MR - Mauritania  
YT - Mayotte  
* MU - Mauritius  
MX - Mexico  
* YT - Mayotte  
FM - Micronesia  
* MX - Mexico  
MD - Moldova  
* FM - Micronesia  
MC - Monaco  
* MD - Moldova  
ME - Montenegro  
* MC - Monaco  
MS - Montserrat  
* ME - Montenegro  
MA - Morocco  
* MS - Montserrat  
MZ - Mozambique  
* MA - Morocco  
MM - Myanmar  
* MZ - Mozambique  
NA - Namibia  
* MM - Myanmar  
NR - Nauru  
* NA - Namibia  
NP - Nepal  
* NR - Nauru  
NL - Netherlands  
* NP - Nepal  
AN - Netherlands Antilles  
* NL - Netherlands  
NT - Neutral Zone  
* AN - Netherlands Antilles  
NC - New Caledonia  
* NT - Neutral Zone  
NZ - New Zealand (Aotearoa)  
* NC - New Caledonia  
NI - Nicaragua  
* NZ - New Zealand (Aotearoa)  
NE - Niger  
* NI - Nicaragua  
NG - Nigeria  
* NE - Niger  
NU - Niue  
* NG - Nigeria  
NF - Norfolk Island  
* NU - Niue  
MP - Northern Mariana Islands  
* NF - Norfolk Island  
NO - Norway  
* MP - Northern Mariana Islands  
OM - Oman  
* NO - Norway  
PK - Pakistan  
* OM - Oman  
PW - Palau  
* PK - Pakistan  
PS - Palestinian Territory, Occupied  
* PW - Palau  
PA - Panama  
* PS - Palestinian Territory, Occupied  
PG - Papua New Guinea  
* PA - Panama  
PY - Paraguay  
* PG - Papua New Guinea  
PE - Peru  
* PY - Paraguay  
PH - Philippines  
* PE - Peru  
PN - Pitcairn  
* PH - Philippines  
PL - Poland  
* PN - Pitcairn  
PT - Portugal  
* PL - Poland  
PR - Puerto Rico  
* PT - Portugal  
QA - Qatar  
* PR - Puerto Rico  
RE - Reunion  
* QA - Qatar  
RO - Romania  
* RE - Reunion  
RU - Russian Federation  
* RO - Romania  
RW - Rwanda  
* RU - Russian Federation  
GS - S. Georgia and S. Sandwich Isles.  
* RW - Rwanda  
KN - Saint Kitts and Nevis  
* GS - S. Georgia and S. Sandwich Isles.  
LC - Saint Lucia  
* KN - Saint Kitts and Nevis  
VC - Saint Vincent & the Grenadines  
* LC - Saint Lucia  
WS - Samoa  
* VC - Saint Vincent & the Grenadines  
SM - San Marino  
* WS - Samoa  
ST - Sao Tome and Principe  
* SM - San Marino  
SA - Saudi Arabia  
* ST - Sao Tome and Principe  
SN - Senegal  
* SA - Saudi Arabia  
RS - Serbia  
* SN - Senegal  
SC - Seychelles  
* RS - Serbia  
SL - Sierra Leone  
* SC - Seychelles  
SG - Singapore  
* SL - Sierra Leone  
SI - Slovenia  
* SG - Singapore  
SK - Slovak Republic  
* SI - Slovenia  
SB - Solomon Islands  
* SK - Slovak Republic  
SO - Somalia  
* SB - Solomon Islands  
ZA - South Africa  
* SO - Somalia  
GS - S. Georgia and S. Sandwich Isles.  
* ZA - South Africa  
ES - Spain  
* GS - S. Georgia and S. Sandwich Isles.  
LK - Sri Lanka  
* ES - Spain  
SH - St. Helena  
* LK - Sri Lanka  
PM - St. Pierre and Miquelon  
* SH - St. Helena  
SD - Sudan  
* PM - St. Pierre and Miquelon  
SR - Surin ame  
* SD - Sudan  
SJ - Svalbard & Jan Mayen Islands  
* SR - Surin ame  
SZ - Swaziland  
* SJ - Svalbard & Jan Mayen Islands  
SE - Sweden  
* SZ - Swaziland  
CH - Switzerland  
* SE - Sweden  
SY - Syria  
* CH - Switzerland  
TW - Taiwan  
* SY - Syria  
TJ - Tajikistan  
* TW - Taiwan  
TZ - Tanzania  
* TJ - Tajikistan  
TH - Thailand  
* TZ - Tanzania  
TG - Togo  
* TH - Thailand  
TK - Tokelau  
* TG - Togo  
TO - Tonga  
* TK - Tokelau  
TT - Trinidad and Tobago  
* TO - Tonga  
TN - Tunisia  
* TT - Trinidad and Tobago  
TR - Turkey  
* TN - Tunisia  
TM - Turkmenistan  
* TR - Turkey  
TC - Turks and Caicos Islands  
* TM - Turkmenistan  
TV - Tuvalu  
* TC - Turks and Caicos Islands  
UG - Uganda  
* TV - Tuvalu  
UA - Ukraine  
* UG - Uganda  
AE - United Arab Emirates  
* UA - Ukraine  
UK - United Kingdom  
* AE - United Arab Emirates  
US - United States  
* UK - United Kingdom  
UM - US Minor Outlying Islands  
* US - United States  
UY - Uruguay  
* UM - US Minor Outlying Islands  
SU - USSR (former)  
* UY - Uruguay  
UZ - Uzbekistan  
* SU - USSR (former)  
VU - Vanuatu  
* UZ - Uzbekistan  
VA - Vatican City State (Holy See)  
* VU - Vanuatu  
VE - Venezuela  
* VA - Vatican City State (Holy See)  
VN - Viet Nam  
* VE - Venezuela  
VG - British Virgin Islands  
* VN - Viet Nam  
VI - Virgin Islands (U.S.)  
* VG - British Virgin Islands  
WF - Wallis and Futuna Islands  
* VI - Virgin Islands (U.S.)  
EH - Western Sahara  
* WF - Wallis and Futuna Islands  
YE - Yemen  
* EH - Western Sahara  
YU - Yugoslavia (former)  
* YE - Yemen  
ZM - Zambia  
* YU - Yugoslavia (former)  
(ZR - Zaire) - See CD Congo, Democratic Republic  
* ZM - Zambia  
ZW - Zimbabwe
* (ZR - Zaire) - See CD Congo, Democratic Republic  
* ZW - Zimbabwe

Revision as of 10:15, 31 May 2019

The user mode terminal checks the certificate of APK when installing. The signature certificate should be issued by the application root certificate. By default, there is default WizarPOS root certificate in the terminal. So the developer should apply development certificate from wizarPOS.

Running Environment

The follow steps will run in PC, and use keytool in JDK, so please make sure you have installed the JDK in your PC.

Generate Private Keystore

 keytool -genkeypair -keystore demo.jks -keyalg RSA -keysize 2048 -alias androiddebugkey -dname "EMAILADDRESS=myname@abc.com, CN=MyName, OU=RD, O=ABC company, L=Shanghai, ST=Shanghai, C=CN"

Notes:

  • Domain name should be filled according the real information of your company. CN=commonName, OU=organizationUnit, O=organizationName, L=localityName, ST=state or province name, C=country.
  • EMAILADDRESS must be filled by company official email address.
  • If you want to use this key store in Eclipse as a custom debug key store, the alias of the key should be “androiddebugkey” and the password should be “android”. If you won’t use this key store in Eclipse, you can use any alias name or password.

Export CSR (Certificate Signature Request)

 keytool -certreq -keystore demo.jks -alias androiddebugkey > demo.csr 

Send CSR to WizarPOS

Send CSR to support@wizarpos.com

Import the Certificate Chain

Import the replied certificate chain of the CSR(*.crt or *.pem), when you receive them from WizarPOS.:

 keytool -importcert -keystore demo.jks -file file-name-of-CSR-reply -alias androiddebugkey

Notes:

  • Store the attached pem file of WizarPOS reply to the same folder of jks file.
  • file-name-of-CSR-reply is the file name of the pem file with certificate chain.
  • Choose Yes, when the importing tools ask you if you want to trust them.

FAQ

Keytool

keytool.exe is in the JRE path, XXX/Java/jreXXX/bin, if you have set the environment variable, JAVA_HOME, you can run keytool command line in every path, or else you must run the command line in the JRE path.

Keysize Problem when Generate Keypair

Please download the unlimited strength policy from java website:

Java6: http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html

Java7: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

Copy the local_policy.jar and US_export_policy.jar to the folder $JAVA_HOME/jre/lib/security

CSR error

After export CSR, please open the CSR in Notepad, if the CSR content begin with "-----BEGIN NEW CERTIFICATE REQUEST-----", end with "-----END NEW CERTIFICATE REQUEST-----", there are contents in the middle, that means the CSR file is right.

If the CSR only contents an error message, please fix the problem according the message.

Country Name Codes

List of 2 letter country codes.


  • AF - Afghanistan
  • AX - Aland Islands
  • AL - Albania
  • DZ - Algeria
  • AS - American Samoa
  • AD - Andorra
  • AO - Angola
  • AI - Anguilla
  • AQ - Antarctica
  • AG - Antigua and Barbuda
  • AR - Argentin a
  • AM - Armenia
  • AW - Aruba
  • AC - Ascension Island
  • AU - Australia
  • AT - Austria
  • AZ - Azerbaijan
  • BS - Bahamas
  • BH - Bahrain
  • BB - Barbados
  • BD - Bangladesh
  • BY - Belarus
  • BE - Belgium
  • BZ - Belize
  • BJ - Benin
  • BM - Bermuda
  • BT - Bhutan
  • BW - Botswana
  • BO - Bolivia
  • BA - Bosnia and Herzegovin a
  • BV - Bouvet Island
  • BR - Brazil
  • IO - British Indian Ocean Territory
  • BN - Brunei Darussalam
  • BG - Bulgaria
  • BF - Burkin a Faso
  • BI - Burundi
  • KH - Cambodia
  • CM - Cameroon
  • CA - Canada
  • CV - Cape Verde
  • KY - Cayman Islands
  • CF - Central African Republic
  • TD - Chad
  • CL - Chile
  • CN - Chin a
  • CX - Christmas Island
  • CC - Cocos (Keeling) Islands
  • CO - Colombia
  • KM - Comoros
  • CG - Congo
  • CD - Congo, Democratic Republic
  • CK - Cook Islands
  • CR - Costa Rica
  • CI - Cote D'Ivoire (Ivory Coast)
  • HR - Croatia (Hrvatska)
  • CU - Cuba
  • CY - Cyprus
  • CZ - Czech Republic
  • CS - Czechoslovakia (former)
  • DK - Denmark
  • DJ - Djibouti
  • DM - Dominica
  • DO - Dominican Republic
  • TP - East Timor
  • EC - Ecuador
  • EG - Egypt
  • SV - El Salvador
  • GQ - Equatorial Guinea
  • ER - Eritrea
  • EE - Estonia
  • ET - Ethiopia
  • FK - Falkland Islands (Malvin as)
  • FO - Faroe Islands
  • FJ - Fiji
  • FI - Finland
  • FR - France
  • FX - France, Metropolitan
  • GF - French Guiana
  • PF - French Polynesia
  • TF - French Southern Territories
  • MK - F.Y.R.O.M. (Macedonia)
  • GA - Gabon
  • GM - Gambia
  • GE - Georgia
  • DE - Germany
  • GH - Ghana
  • GI - Gibraltar
  • GB - Great Britain (UK)
  • GR - Greece
  • GL - Greenland
  • GD - Grenada
  • GP - Guadeloupe
  • GU - Guam
  • GT - Guatemala
  • GN - Guinea
  • GW - Guinea-Bissau
  • GY - Guyana
  • HT - Haiti
  • HM - Heard and McDonald Islands
  • HN - Honduras
  • HK - Hong Kong
  • HU - Hungary
  • IS - Iceland
  • IN - India
  • ID - Indonesia
  • IR - Iran
  • IQ - Iraq
  • IE - Ireland
  • IL - Israel
  • IM - Isle of Man
  • IT - Italy
  • JE - Jersey
  • JM - Jamaica
  • JP - Japan
  • JO - Jordan
  • KZ - Kazakhstan
  • KE - Kenya
  • KI - Kiribati
  • KP - Korea (North)
  • KR - Korea (South)
  • KW - Kuwait
  • KG - Kyrgyzstan
  • LA - Laos
  • LV - Latvia
  • LB - Lebanon
  • LI - Liechtenstein
  • LR - Liberia
  • LY - Libya
  • LS - Lesotho
  • LT - Lithuania
  • LU - Luxembourg
  • MO - Macau
  • MG - Madagascar
  • MW - Malawi
  • MY - Malaysia
  • MV - Maldives
  • ML - Mali
  • MT - Malta
  • MH - Marshall Islands
  • MQ - Martinique
  • MR - Mauritania
  • MU - Mauritius
  • YT - Mayotte
  • MX - Mexico
  • FM - Micronesia
  • MD - Moldova
  • MC - Monaco
  • ME - Montenegro
  • MS - Montserrat
  • MA - Morocco
  • MZ - Mozambique
  • MM - Myanmar
  • NA - Namibia
  • NR - Nauru
  • NP - Nepal
  • NL - Netherlands
  • AN - Netherlands Antilles
  • NT - Neutral Zone
  • NC - New Caledonia
  • NZ - New Zealand (Aotearoa)
  • NI - Nicaragua
  • NE - Niger
  • NG - Nigeria
  • NU - Niue
  • NF - Norfolk Island
  • MP - Northern Mariana Islands
  • NO - Norway
  • OM - Oman
  • PK - Pakistan
  • PW - Palau
  • PS - Palestinian Territory, Occupied
  • PA - Panama
  • PG - Papua New Guinea
  • PY - Paraguay
  • PE - Peru
  • PH - Philippines
  • PN - Pitcairn
  • PL - Poland
  • PT - Portugal
  • PR - Puerto Rico
  • QA - Qatar
  • RE - Reunion
  • RO - Romania
  • RU - Russian Federation
  • RW - Rwanda
  • GS - S. Georgia and S. Sandwich Isles.
  • KN - Saint Kitts and Nevis
  • LC - Saint Lucia
  • VC - Saint Vincent & the Grenadines
  • WS - Samoa
  • SM - San Marino
  • ST - Sao Tome and Principe
  • SA - Saudi Arabia
  • SN - Senegal
  • RS - Serbia
  • SC - Seychelles
  • SL - Sierra Leone
  • SG - Singapore
  • SI - Slovenia
  • SK - Slovak Republic
  • SB - Solomon Islands
  • SO - Somalia
  • ZA - South Africa
  • GS - S. Georgia and S. Sandwich Isles.
  • ES - Spain
  • LK - Sri Lanka
  • SH - St. Helena
  • PM - St. Pierre and Miquelon
  • SD - Sudan
  • SR - Surin ame
  • SJ - Svalbard & Jan Mayen Islands
  • SZ - Swaziland
  • SE - Sweden
  • CH - Switzerland
  • SY - Syria
  • TW - Taiwan
  • TJ - Tajikistan
  • TZ - Tanzania
  • TH - Thailand
  • TG - Togo
  • TK - Tokelau
  • TO - Tonga
  • TT - Trinidad and Tobago
  • TN - Tunisia
  • TR - Turkey
  • TM - Turkmenistan
  • TC - Turks and Caicos Islands
  • TV - Tuvalu
  • UG - Uganda
  • UA - Ukraine
  • AE - United Arab Emirates
  • UK - United Kingdom
  • US - United States
  • UM - US Minor Outlying Islands
  • UY - Uruguay
  • SU - USSR (former)
  • UZ - Uzbekistan
  • VU - Vanuatu
  • VA - Vatican City State (Holy See)
  • VE - Venezuela
  • VN - Viet Nam
  • VG - British Virgin Islands
  • VI - Virgin Islands (U.S.)
  • WF - Wallis and Futuna Islands
  • EH - Western Sahara
  • YE - Yemen
  • YU - Yugoslavia (former)
  • ZM - Zambia
  • (ZR - Zaire) - See CD Congo, Democratic Republic
  • ZW - Zimbabwe