
#use wml::openssl-macros area=docs page=RSA_sign_ASN1_OCTET_STRING

<title>Documents, RSA_sign_ASN1_OCTET_STRING(3)</title>

<h1>RSA_sign_ASN1_OCTET_STRING(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#BUGS">BUGS</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
	<LI><A HREF="#HISTORY">HISTORY</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
RSA_sign_ASN1_OCTET_STRING, RSA_verify_ASN1_OCTET_STRING - RSA signatures

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/rsa.h&gt;
</PRE>
<PRE> int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
    unsigned int m_len, unsigned char *sigret, unsigned int *siglen,
    RSA *rsa);
</PRE>
<PRE> int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
    unsigned int m_len, unsigned char *sigbuf, unsigned int siglen,
    RSA *rsa);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
<CODE>RSA_sign_ASN1_OCTET_STRING()</CODE> signs the octet string <STRONG>m</STRONG> of size
<STRONG>m_len</STRONG> using the private key <STRONG>rsa</STRONG> represented in DER using PKCS #1 padding. It stores the signature in <STRONG>sigret</STRONG> and the signature size in <STRONG>siglen</STRONG>. <STRONG>sigret</STRONG> must point to <STRONG>RSA_size(rsa)</STRONG> bytes of memory.

</P>
<P>
<STRONG>dummy</STRONG> is ignored.

</P>
<P>
The random number generator must be seeded prior to calling
<CODE>RSA_sign_ASN1_OCTET_STRING().</CODE>

</P>
<P>
<CODE>RSA_verify_ASN1_OCTET_STRING()</CODE> verifies that the signature <STRONG>sigbuf</STRONG>
of size <STRONG>siglen</STRONG> is the DER representation of a given octet string
<STRONG>m</STRONG> of size <STRONG>m_len</STRONG>. <STRONG>dummy</STRONG> is ignored. <STRONG>rsa</STRONG> is the signer's public key.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
<CODE>RSA_sign_ASN1_OCTET_STRING()</CODE> returns 1 on success, 0
otherwise. <CODE>RSA_verify_ASN1_OCTET_STRING()</CODE> returns 1 on
successful verification, 0 otherwise.

</P>
<P>
The error codes can be obtained by <A HREF="../crypto/ERR_get_error.html#">ERR_get_error(3)</A>.

</P>
<P>
<HR>
<H1><A NAME="BUGS">BUGS</A></H1>
<P>
These functions serve no recognizable purpose.

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../crypto/ERR_get_error.html#">ERR_get_error(3)</A>, <EM>objects(3)</EM>,
<A HREF="../crypto/rand.html#">rand(3)</A>, <A HREF="../crypto/rsa.html#">rsa(3)</A>, <A HREF="../crypto/RSA_sign.html#">RSA_sign(3)</A>,
<A HREF="../crypto/RSA_sign.html#">RSA_verify(3)</A>



</P>
<P>
<HR>
<H1><A NAME="HISTORY">HISTORY</A></H1>
<P>
<CODE>RSA_sign_ASN1_OCTET_STRING()</CODE> and
<CODE>RSA_verify_ASN1_OCTET_STRING()</CODE> were added in SSLeay 0.8.

</P>
:}


