1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<TITLE>NWC24SetDlPublicKey</TITLE>
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<LINK rel="stylesheet" type="text/css" href="../nwc24.css">
9</HEAD>
10<BODY>
11<H1>NWC24SetDlPublicKey</H1>
12
13<H2>C Specification</H2>
14<DL>
15<DD><PRE><CODE>#include &lt;revolution/nwc24.h&gt;</CODE></PRE>
16<DD><PRE><CODE>#define NWC24_DL_PUBLICKEY_LENGTH               (2048 / 8)
17
18<A HREF="../Types/NWC24Err.html">NWC24Err</A> NWC24SetDlPublicKey( const <A HREF="../Types/NWC24DlTask.html">NWC24DlTask</A>* <VAR>taskPublic</VAR>, const u8 <VAR>publicKey[NWC24_DL_PUBLICKEY_LENGTH]</VAR> );</CODE></PRE>
19</DL>
20
21<H2>Description</H2>
22<P class="obsoleted">
23This function is retained for compatibility. From here on you should use <A href="NWC24SetDlKeys.html"><CODE>NWC24SetDlKeys</CODE></A>.
24</P>
25<P>
26Sets 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.)<BR>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 <CODE>NANDCheck</CODE>.<BR>
27</P>
28<P>
29The specified public key will not be used merely by calling this function. Public keys should be enabled in the application with <A href="NWC24SetDlFlags.html"><CODE>NWC24SetDlFlags()</CODE></A>.
30</P>
31
32<H2>Arguments</H2>
33<TABLE border="1" cellpadding="3" cellspacing="0.1" class="argument">
34  <TR>
35<TD class="name"><code><VAR>taskPublic</VAR></code></TD>
36    <TD class="description">
37Pointer to the download task.
38    </TD>
39  </TR>
40  <TR>
41<TD class="name"><code><VAR>publicKey</VAR></code></TD>
42    <TD class="description">
43Public Key
44    </TD>
45  </TR>
46</TABLE>
47
48<h2>Return Values</h2>
49<P>
50<code>NWC24_OK</code>: Ended normally.<BR> <code>NWC24_ERR_LIB_NOT_OPENED</code>: The library has not been opened.<BR> <code>NWC24_ERR_PROTECTED</code>: Could not write the download task.<BR> <code>NWC24_ERR_INVALID_VALUE</code>: The value of either <code><VAR>taskPublic</VAR></code> or <code><VAR>publicKey</VAR></code> is NULL, or the download task is invalid.<BR> <code>NWC24_ERR_FILE_*</code>: Error relating to internal file operations.<BR> <code>NWC24_ERR_FATAL</code>: A fatal error has occurred.<BR>
51</P>
52
53<H2>See Also</H2>
54<P>
55</P>
56
57<H2>Revision History</H2>
58<P>
592007/08/28 Added mention that use of this function is not recommended.<BR>2006/06/07 Added text about the specified key format.<BR>2006/12/05 Initial version.<BR>
60</P>
61
62<hr><p>CONFIDENTIAL</p></body>
63</HTML>