I just downloaded the link @goldilocks provided, http://acme.com/software/oauth_sign/, and confirmed that it compiles. Looks very straightfoward.
compile
$ make
gcc -c -Wall -O liboauthsign.c
liboauthsign.c: In function ‘oauth_sign’:
liboauthsign.c:123:5: warning: implicit declaration of function ‘getpid’
liboauthsign.c:305:5: warning: pointer targets in passing argument 4 of ‘HMAC’ differ in signedness
/usr/include/openssl/hmac.h:99:16: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
rm -f liboauthsign.a
ar rc liboauthsign.a liboauthsign.o
ranlib liboauthsign.a
gcc -Wall -O oauth_sign.c -L. -loauthsign -lcrypto -o oauth_sign
usage
$ ./oauth_sign --help
usage: oauth_sign [-q] consumer_key consumer_key_secret token token_secret method url [name=value ...]
excerpt from README
To use it, you supply the four cryptographic cookies and the method
and URL of the request. If it's a POST request with extra parameters,
you have to give those too. Oauth_sign puts all this together and
makes the signature string. The signature is generated using
HMAC-SHA1 as specified in RFC section 3.4.2, and is returned as an
Authorization header value as specified in RFC section 3.5.1. This
header can then be used in an HTTP request via, for example, the
-h flag in http_get(1) and http_post(1) or the -H flag in curl(1).
Looks like it comes with a library exposing the fuctions for use in your own C applications as well.