| /* Copyright (c) 2018, The Linux Foundation. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions are |
| * met: |
| * * Redistributions of source code must retain the above copyright |
| * notice, this list of conditions and the following disclaimer. |
| * * Redistributions in binary form must reproduce the above |
| * copyright notice, this list of conditions and the following |
| * disclaimer in the documentation and/or other materials provided |
| * with the distribution. |
| * * Neither the name of The Linux Foundation nor the names of its |
| * contributors may be used to endorse or promote products derived |
| * from this software without specific prior written permission. |
| * |
| * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| |
| #ifndef __LE_OEM_CERTIFICATE_H |
| #define __LE_OEM_CERTIFICATE_H |
| |
| /* |
| Instructions to generate private.key and X509 certificate |
| |
| A) Generate a sha256 self-signed X509 certificate and a 2048 bits |
| RSA private key |
| $ openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout |
| qtipri.key -out qti.crt.pem |
| |
| B) convert private key from PKCS#8 to PKCS#1 format, save it as qti.key. |
| $ openssl rsa -in qtipri.key -out qti.key |
| |
| C) This private key "qti.key" need to be saved under folder |
| "poky/recipes-kernel/linux-quic/kernel/" and |
| "poky/recipes-kernel/linux-msm-4.9/kernel/", used to generate bootimage |
| signature. |
| |
| D) convert certificate from PEM to DER format |
| $ openssl x509 -outform der -in qti.crt.pem -out qti.crt.der |
| |
| E) open qti.crt.der file in a HEX editor, and then put HEX numbers into array |
| LeOemCertificate[] in LEOEMCertificate.h |
| |
| */ |
| |
| static CONST UINT8 LeOemCertificate[] = { |
| 0x30, 0x82, 0x03, 0x4F, 0x30, 0x82, 0x02, 0x37, 0xA0, 0x03, 0x02, 0x01, |
| 0x02, 0x02, 0x09, 0x00, 0xED, 0x2C, 0x2E, 0x88, 0xA4, 0xC8, 0xF4, 0x60, |
| 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, |
| 0x0B, 0x05, 0x00, 0x30, 0x3E, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, |
| 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, |
| 0x55, 0x04, 0x08, 0x0C, 0x02, 0x43, 0x41, 0x31, 0x0C, 0x30, 0x0A, 0x06, |
| 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x03, 0x51, 0x54, 0x49, 0x31, 0x14, 0x30, |
| 0x12, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0B, 0x4C, 0x45, 0x20, 0x54, |
| 0x65, 0x73, 0x74, 0x20, 0x4B, 0x65, 0x79, 0x30, 0x1E, 0x17, 0x0D, 0x31, |
| 0x37, 0x30, 0x36, 0x31, 0x34, 0x32, 0x32, 0x32, 0x34, 0x34, 0x33, 0x5A, |
| 0x17, 0x0D, 0x31, 0x38, 0x30, 0x36, 0x31, 0x34, 0x32, 0x32, 0x32, 0x34, |
| 0x34, 0x33, 0x5A, 0x30, 0x3E, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, |
| 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, |
| 0x55, 0x04, 0x08, 0x0C, 0x02, 0x43, 0x41, 0x31, 0x0C, 0x30, 0x0A, 0x06, |
| 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x03, 0x51, 0x54, 0x49, 0x31, 0x14, 0x30, |
| 0x12, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0B, 0x4C, 0x45, 0x20, 0x54, |
| 0x65, 0x73, 0x74, 0x20, 0x4B, 0x65, 0x79, 0x30, 0x82, 0x01, 0x22, 0x30, |
| 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, |
| 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00, 0x30, 0x82, 0x01, 0x0A, 0x02, |
| 0x82, 0x01, 0x01, 0x00, 0xCD, 0x4E, 0xC2, 0x72, 0xAE, 0x2F, 0xF8, 0xE2, |
| 0xF2, 0xEB, 0x96, 0xC8, 0xDE, 0xDB, 0xBC, 0x5F, 0x03, 0xF1, 0x8B, 0x36, |
| 0xBB, 0x5E, 0xAC, 0x4B, 0x75, 0x44, 0xF2, 0x8C, 0xB2, 0x46, 0xF3, 0x73, |
| 0xF2, 0xDC, 0xCE, 0x5D, 0x7E, 0xE6, 0x9C, 0x18, 0xF5, 0x04, 0x4D, 0xA3, |
| 0x1E, 0x25, 0xDB, 0xD9, 0x81, 0x09, 0x1A, 0xE6, 0xA2, 0x8E, 0xF1, 0xFA, |
| 0x72, 0x5C, 0xAA, 0xC4, 0x2C, 0xC3, 0x58, 0x70, 0xC1, 0xE1, 0x94, 0xCC, |
| 0x5D, 0x32, 0x92, 0xD0, 0xBA, 0x18, 0x82, 0xF0, 0x2B, 0xA1, 0xA4, 0x94, |
| 0x64, 0x03, 0x59, 0x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x03, 0x01, 0x00, |
| 0x01, 0xA3, 0x50, 0x30, 0x4E, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, |
| 0x04, 0x16, 0x04, 0x14, 0x16, 0x26, 0x6C, 0x02, 0xEC, 0x9E, 0x88, 0x19, |
| 0xF4, 0x7A, 0x19, 0xA8, 0x90, 0x08, 0x72, 0xB4, 0x4B, 0x18, 0x21, 0x3D, |
| 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, |
| 0x14, 0x16, 0x26, 0x6C, 0x02, 0xEC, 0x9E, 0x88, 0x19, 0xF4, 0x7A, 0x19, |
| 0xA8, 0x90, 0x08, 0x72, 0xB4, 0x4B, 0x18, 0x21, 0x3D, 0x30, 0x0C, 0x06, |
| 0x03, 0x55, 0x1D, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, |
| 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B, |
| 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x79, 0x03, 0x42, 0x8F, 0x25, |
| 0x8C, 0xC7, 0x75, 0xF8, 0x91, 0x20, 0x76, 0x5C, 0x45, 0xD1, 0x88, 0x22, |
| 0x6B, 0xDC, 0xFC, 0xAB, 0x65, 0x7D, 0x39, 0x46, 0xAD, 0xC4, 0x18, 0x1D, |
| 0xFB, 0x6A, 0x67, 0x50, 0xC6, 0xE4, 0xBC, 0x73, 0xD2, 0xE6, 0xB6, 0x3A, |
| 0xC9, 0xB8, 0x41, 0x24, 0x13, 0x3E, 0xF3, 0xBC, 0x0C, 0xC7, 0xE2, 0x2D, |
| 0xB4, 0x3C, 0x33, 0xA6, 0x66, 0x0D, 0xD6, 0x3D, 0x8E, 0x3C, 0x2D, 0xFA, |
| 0x78, 0xF1, 0x30, 0xB5, 0x11, 0xF9, 0x73, 0x52, 0x56, 0x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