CONFIG_ENV_OFFSET=0x000C0000
CONFIG_ENV_SIZE=0x00010000
CONFIG_ENV_SECT_SIZE=0x00010000
-CONFIG_MIPS_RELOCATION_TABLE_SIZE=0x8700
+CONFIG_MIPS_RELOCATION_TABLE_SIZE=0x9000
CONFIG_SYS_LOAD_ADDR=0x80100000
CONFIG_TOOLS_LIBCRYPTO=n
-CONFIG_SYS_CLK_FREQ=1200000000
\ No newline at end of file
+CONFIG_SYS_CLK_FREQ=1200000000
#include <image.h>
#include <version.h>
+/*
#include <openssl/pem.h>
#include <openssl/evp.h>
+*/
#define IMAGE_PRE_LOAD_PATH "/image/pre-load/sig"
* 2) get public key (X509_get_pubkey)
* 3) provide der format (d2i_RSAPublicKey)
*/
+
+/*
static int read_pub_key(const char *keydir, const void *name,
unsigned char **pubkey, int *pubkey_len)
{
memset(path, 0, 1024);
snprintf(path, sizeof(path), "%s/%s.crt", keydir, (char *)name);
- /* Open certificate file */
+ // Open certificate file
f = fopen(path, "r");
if (!f) {
fprintf(stderr, "Couldn't open RSA certificate: '%s': %s\n",
return -EACCES;
}
- /* Read the certificate */
+ // Read the certificate
cert = NULL;
if (!PEM_read_X509(f, &cert, NULL, NULL)) {
printf("Couldn't read certificate");
goto err_cert;
}
- /* Get the public key from the certificate. */
+ // Get the public key from the certificate.
key = X509_get_pubkey(cert);
if (!key) {
printf("Couldn't read public key\n");
goto err_pubkey;
}
- /* Get DER form */
+ // Get DER form
ret = i2d_PublicKey(key, pubkey);
if (ret < 0) {
printf("Couldn't get DER form\n");
fclose(f);
return ret;
}
+*/
int fit_pre_load_data(const char *keydir, void *keydest, void *fit)
{
int pre_load_noffset;
const void *algo_name;
const void *key_name;
- unsigned char *pubkey = NULL;
- int ret, pubkey_len;
+ //unsigned char *pubkey = NULL;
+ //int pubkey_len;
+ int ret;
if (!keydir || !keydest || !fit)
return 0;
goto out;
}
- /* Read public key */
+ ret = 0;
+
+ /*
+ // Read public key
ret = read_pub_key(keydir, key_name, &pubkey, &pubkey_len);
if (ret < 0)
goto out;
- /* Add the public key to the device tree */
+ // Add the public key to the device tree
ret = fdt_setprop(keydest, pre_load_noffset, "public-key",
pubkey, pubkey_len);
if (ret)
printf("Can't set public-key in node %s (ret = %d)\n",
IMAGE_PRE_LOAD_PATH, ret);
-
+ */
out:
return ret;
}