chibipub

experimental activitypub node in C
git clone git://jb55.com/chibipub
Log | Files | Refs | README | LICENSE

commit 12cfbb43467c81acf5a2b05f68f196c66937ac55
parent d5a20d48abe0113d159e256579ff48f045b7cece
Author: William Casarin <jb55@jb55.com>
Date:   Sat,  6 Mar 2021 17:19:01 -0800

chibipub: get rsa pubkey from env

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/chibipub.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/chibipub.c b/src/chibipub.c @@ -41,6 +41,11 @@ static inline const char *get_hostname() return getenv("CHIBIPUB_HOST"); } +static inline const char *get_pubkey() +{ + return getenv("CHIBIPUB_PUBKEY"); +} + static inline const char *get_id() { const char *ret; @@ -293,7 +298,7 @@ static void test_profile(struct profile *p) p->image_mime_type = "image/jpeg"; p->image_url = "https://jb55.com/s/blue-me.jpg"; p->key_id = "main-key"; - p->pubkey_pem = "-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnJOPxwmRGBBQYm7YgHRubTaYaKbMoEQiui+37nizXA73CRNeKblSXIaJnfOKfz/ttRG0GH43GzHTpghUDuZX+QBpyOk8UMmCW5gM0Y5c3IOv0zLezqLXrVEM8UXMUHE3hxf61r1NKl1+IG9MwhtHayx0Kaz6vT/V8nkotCSlb91lMT8X28bButwN86RCclZncecQXuVvgXnFeZCeBLM+qV2tBPnn14Ws+AqVvVnBW8xXwVfSPFHQchSLAusdWI7Kw/oWN/on2CqfRASoaVASqKG+uPuJ+1f92iH0ZY1wLB2/ITl7HKTiIMKNikXTWcUudkMlKxc5Iqb7HMHuaPZ9IQIDAQAB-----END PUBLIC KEY-----"; + p->pubkey_pem = get_pubkey(); } static int handle_self(struct http_req *req)