LIBRESSL-RSA_SIGN_ASN1_OCTET_STRING(3)
π NAME π
okay so bestie, welcome to the RSA_SIGN_ASN1_OCTET_STRING(3) page β it lives in section 3, the Library Functions Manual, and it's literally all about the two functions RSA_sign_ASN1_OCTET_STRING and RSA_verify_ASN1_OCTET_STRING, aka RSA signatures π
β¨ SYNOPSIS β¨
like, here's the whole thing, character for character, no cap:
library βlibcryptoβ #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 πΈ
So RSA_sign_ASN1_OCTET_STRING() signs the octet string m of size m_len using the private key rsa β and that key is represented in DER using PKCS #1 padding, periodt π
It drops the signature into sigret and the signature size into siglen.
β οΈ Important vibe check:sigretmust point toRSA_size(rsa)bytes of memory. Like, don't skimp on the buffer, bestie, it will not end well π
And dummy? Completely ignored. Not even a little bit. It's giving decorative parameter energy π«Ά
RSA_verify_ASN1_OCTET_STRING() is the other half of the duo β it 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 here too (iconic of it π), and rsa is the signer's public key.
π RETURN VALUES π
RSA_sign_ASN1_OCTET_STRING()returns1on success, or0otherwise πRSA_verify_ASN1_OCTET_STRING()returns1on successful verification, or0otherwise π
If you gotta know why something flopped, the error codes can be obtained by ERR_get_error(3) β go find out, queen π
π¦ SEE ALSO π¦
π HISTORY π
RSA_sign_ASN1_OCTET_STRING() and RSA_verify_ASN1_OCTET_STRING() first appeared in SSLeay 0.8.0, and they've been available since OpenBSD 2.4 β elder emoji status fr fr π₯
π BUGS π
Screenshot this and send it to the group chat: these functions serve no recognizable purpose. That's it. That's the bug note. The manpage said what it said ππ
so yeah, that's the whole page π§ this one's from the Debian crew, dated June 8, 2025, and the page title is RSA_SIGN_ASN1_OCTET_STRING(3) β mwah, stan, bye ππ
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2000 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms