---
name: "libressl-RSA_sign_ASN1_OCTET_STRING"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-RSA_sign_ASN1_OCTET_STRING"
---

# libressl-RSA\_sign\_ASN1\_OCTET\_STRING(3)

RSA signatures

## NAME

**RSA\_sign\_ASN1\_OCTET\_STRING**, **RSA\_verify\_ASN1\_OCTET\_STRING** – RSA signatures

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/rsa.h\>**

*int*\

**RSA\_sign\_ASN1\_OCTET\_STRING**(*int dummy*, *unsigned char \*m*, *unsigned int m\_len*, *unsigned char \*sigret*, *unsigned int \*siglen*, *RSA \*rsa*);

*int*\

**RSA\_verify\_ASN1\_OCTET\_STRING**(*int dummy*, *unsigned char \*m*, *unsigned int m\_len*, *unsigned char \*sigbuf*, *unsigned int siglen*, *RSA \*rsa*);

## DESCRIPTION

**RSA\_sign\_ASN1\_OCTET\_STRING**() signs the octet string *m* of size *m\_len* using the private key *rsa* represented in DER using PKCS #1 padding. It stores the signature in *sigret* and the signature size in *siglen*. *sigret* must point to **RSA\_size**(*rsa*) bytes of memory.

*dummy* is ignored.

**RSA\_verify\_ASN1\_OCTET\_STRING**() verifies that the signature *sigbuf* of size *siglen* is the DER representation of a given octet string *m* of size *m\_len*. *dummy* is ignored. *rsa* is the signer's public key.

## RETURN VALUES

**RSA\_sign\_ASN1\_OCTET\_STRING**() returns 1 on success or 0 otherwise. **RSA\_verify\_ASN1\_OCTET\_STRING**() returns 1 on successful verification or 0 otherwise.

The error codes can be obtained by ERR\_get\_error(3).

## SEE ALSO

RSA\_new(3), RSA\_sign(3), RSA\_verify(3)

## HISTORY

**RSA\_sign\_ASN1\_OCTET\_STRING**() and **RSA\_verify\_ASN1\_OCTET\_STRING**() first appeared in SSLeay 0.8.0 and have been available since OpenBSD 2.4.

## BUGS

These functions serve no recognizable purpose.
