NWC24SetDlPublicKey

C Specification

#include <revolution/nwc24.h>
#define NWC24_DL_PUBLICKEY_LENGTH               (2048 / 8)

NWC24Err NWC24SetDlPublicKey( const NWC24DlTask* taskPublic, const u8 publicKey[NWC24_DL_PUBLICKEY_LENGTH] );

Description

This function is retained for compatibility. From here on you should use NWC24SetDlKeys.

Sets the public key for signature verification. Only one key is registered for the entire application. In other words, there is not a separate key for every task. Do not directly specify the public key in ASN.1 format. Rather, use only the 2048-bit public coefficient portion. (In ASN.1 format if created with OpenSSL.)
The first time the function executes it creates a file of maximum size 2KB in the Home directory, so you need to check this using NANDCheck.

The specified public key will not be used merely by calling this function. Public keys should be enabled in the application with NWC24SetDlFlags().

Arguments

taskPublic Pointer to the download task.
publicKey Public Key

Return Values

NWC24_OK: Ended normally.
NWC24_ERR_LIB_NOT_OPENED: The library has not been opened.
NWC24_ERR_PROTECTED: Could not write the download task.
NWC24_ERR_INVALID_VALUE: The value of either taskPublic or publicKey is NULL, or the download task is invalid.
NWC24_ERR_FILE_*: Error relating to internal file operations.
NWC24_ERR_FATAL: A fatal error has occurred.

See Also

Revision History

2007/08/28 Added mention that use of this function is not recommended.
2006/06/07 Added text about the specified key format.
2006/12/05 Initial version.


CONFIDENTIAL