Generate Key Pair (RS256)
Linux & Windows
Step 1: Generate Private Key
openssl genpkey -algorithm RSA -out duitnow_pay_priv.key -pkeyopt rsa_keygen_bits:2048
duitnow_pay_priv.key
file will be generated with content like below,
-----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDS1FoHuAOTqSmr GatYuIAEVKPefOlfpBUGcVAPyPXO6AXlXNe4ZIV/+1lwbo7oABaXmYdh6G3msn37 OFZxqsR6do37hBmEPRvfezhezJqrVmz92iayt5fg3F5S5+uRcnFafmCv0xHUVchf iyn29DkdUpyjqMFLdB3GCKGV73viJnEXC7x6Zc3ydZu4vuecD6+7gb9irdDNubjG eQxpPsi21eNv8zCEkb9D662/UiDw7MFXAu2jTaMpPiU1Kar2Dm4apWlUY53Yj6HP C8vCtrhE0anSw511ehdPW96tzF0mqr4aWRsz0CXMlkvso0mHqxHKsWMyzBvtFCE7 ABe0vZJ/AgMBAAECggEAVhhnx50qwMMlA/1QjsORa7NQ1Au4ldkAyQe/BSMw1lTE C501btSF+/Sd2p8bdryKfVAyDBaJwtsDPXMNQg/VepktdBfG/8ygtEuygmwVgYCi s6vBf9wfhrEXR83z0gqlJapUO5j7P/XkBLhk47dqF4Jj+yVwAish+XwO2JbaxUfl gP41LJnC1Vu0Ai15h9ORl3VMerUiEl0/8oZhCG4B/6VWH86f9bYZpBaQd12UMXe+ dZXeu8hEENChxMRADsjE2UdA3qx5EyME2zVl0+//wbjRIrcRCqVaaMsBF8WGYI6I HyWAEARh01o3IqVy9rKwq8zTBph5nKX7edvQwarBaQKBgQD1bDLkYMuEeA+hnnpx vi/PFgf5+qIxGvwDz7soZEjM7lgDLtyy6BMCH3i9qNe9CyZpNzdC4GTB+Enkr5Nk HQlUplmOtTLReblNQkd9szwOqyLNFjPYPihKzGRMSLlqpyNEa6ZcC5TqyOYnp0xr MtHbyE1xTaH5X0W9IdR7Ssz8zQKBgQDb6nqpQoY27fj0wbS2tT1T8rBhfsu1qk+R P6V+VLoK162tPYgrLE+bRPNNAdhRStWVKu+opCM9aTE3czFG4rsCTjI3mUG7R96k iLCDf9iZHLbv1WuWLQ1Rv01MaBc9n9eWyJhzBVUWYZxbDbEJPZkjWh6zytN9O7DV JO7dUgCMewKBgQCgjeo1UcWSoeDIAJ9l7d/lACqztO2KZnbcH3f3ErQ1rO9TFcM4 H27gAqrAmMaaW8MDLiYu0BHae44L13j7E6vY/wKzw4K9W36INoYCi9EMX5TiylWc b/14AYLUDPeP+EuwJSSuLr17Y3Z+Fop9zr9PoxhWuUzvkQ5Ujt8s0WCNOQKBgCCq sPPJjPRF3zBEQdrOC0EYELk6w3nFxbH2uVeNsGEB7quIM1zuZRjUYiuzNXXF3voc eaMcVpu9r3DkLJKyBUNvaCg4HLp8D4dzQn0WFY+Q41+23Rdes9bLyuipoaImxzh/ rZ2QUjZT44zm+MA9pSzKKztbypSUtEzFArJfhvNXAoGAXtlevTfhiHQ0AJzCYe8L TIxT6Xz3haEjDJoOPntIybR1E41aaApzmTPJYdi5faY7/CowSI3hcCoxqkt8K/Im Tko6JRVyiW5nhwx4w32TSHWsLqt0pJOsVDBVYA4e230CaEY9K5uQhhkQnAbAxBEV YauC4mlPLKyq3tYBMEBAKQQ= -----END PRIVATE KEY-----
Step 2: Generate CSR
Using the private key generated in Step 1, duitnow_pay_priv.key
in case, to generate certificate sign request,
openssl req -out duitnow_pay.csr -key duitnow_pay_priv.key -new -sha256
Questions will be prompted during CSR generation, please answer by referring the following tables, skip challenge password
,
Country Name (C) | Country Code: MY |
State/County/Region (S) | State: Kuala Lumpur |
City/Locality (L) | Postcode: 59200 |
Organization Name (O) | Applicant's organization name. For example:MerchantX Sdn Bhd |
Organizational Unit (OU) | Indicate the name of the product or service. For example:
|
Common Name (CN) | Assign the appropriate value based on your application type:
|
Email Address (E) | Business email address |
You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:MY State or Province Name (full name) []:Kuala Lumpur Locality Name (eg, city) [Default City]:59200 Organization Name (eg, company) [Default Company Ltd]:MerchantX Sdn Bhd Organizational Unit Name (eg, section) []:DuitNow Pay Common Name (eg, your name or your server's hostname) []:P12345678 Email Address []:support@merchantX.my
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
duitnow_pay.csr
file will be generated with content like below,
-----BEGIN CERTIFICATE REQUEST----- MIIC6DCCAdACAQAwgaIxCzAJBgNVBAYTAk1ZMRUwEwYDVQQIDAxLdWFsYSBMdW1w dXIxDjAMBgNVBAcMBTU5MjAwMRowGAYDVQQKDBFNZXJjaGFudFggU2RuIEJoZDEY MBYGA1UECwwPUGF5TmV0IENoZWNrb3V0MREwDwYDVQQDDAhNMDAwMDIzMzEjMCEG CSqGSIb3DQEJARYUc3VwcG9ydEBtZXJjaGFudFgubXkwggEiMA0GCSqGSIb3DQEB AQUAA4IBDwAwggEKAoIBAQDJZon2qSPBcaY+XebVjUGkR4qJd1FILJ5dBbPFcV6W 4rTMYYYyYNPelBnJDLdcI6/8M3xtD/0mVRNGoVifaQ731WNjboYTjKbhygSBnq/c Y1OU4NHqS40pFKT6Dc473K//hJYX9z9bj8u33DEnu9wWlGqR31lRPJnSg6uM3YCM 98eCywCZRNMUSiNedUyxjCd69VwMQCkzyfdh/WHSPV4qOd0VU8ftu8neuN4SX8D7 7ribClCgCCMZ1BVo9Btzq/c3SaLKWDqoHW8KSDKaCI4rrMo1o/tiobnPnU5ujSBw prVQN7wTV2S0YM/h4TbY2V59k4iB/onBvKxVxSuSDEHnAgMBAAGgADANBgkqhkiG 9w0BAQsFAAOCAQEAXc8h65yBnRtVKLaM0wx3A4dCmZQZEMFZYevtSWBTKz/tFrpB BpYhwlgSQ6QivJsSjwOe/vgQOZtDyOg2/+yCtQjfwmKe/+4Vbtp6w3EktuTIA2Ia RCkoCeeqRTB5PigGu7fLMGUVhM6G7A/g1Fgi51O7EZMcO279hoIPtP3lo3zD4ASc 3wNAe7PE82afoATxekHxIJS9zS0qNGjqFXYgYKU8FXhEqsVrkEsaOTTc3/akmcBR smHhy6TWwCz3sOjQp8l+4UYaUsKwbtI1+ejWZSkMGkE3EoS8oOOs/YPiAxwtRCgQ QLXYO5iRNSeOEaOcSgdvxvTj0oJt8FLft5KX4A== -----END CERTIFICATE REQUEST-----
Step 3: Upload duitnow_pay.csr
to Developer Portal during system verification stage.