diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-19 15:47:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-21 12:24:08 -0400 |
commit | 9566ed6fd9e4aab2ce6b84afc2f7112550cf0483 (patch) | |
tree | c9fc667a53d2b6e748062b08f7ca3c9734b78741 /src/lib/encoding/pem.h | |
parent | 0812f1cbc2f528f0acb785e2fea416b9f2113c7c (diff) | |
download | tor-9566ed6fd9e4aab2ce6b84afc2f7112550cf0483.tar.gz tor-9566ed6fd9e4aab2ce6b84afc2f7112550cf0483.zip |
Add rudimentary support for PEM-encoding, since NSS doesn't do that.
Diffstat (limited to 'src/lib/encoding/pem.h')
-rw-r--r-- | src/lib/encoding/pem.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/encoding/pem.h b/src/lib/encoding/pem.h new file mode 100644 index 0000000000..ba21228848 --- /dev/null +++ b/src/lib/encoding/pem.h @@ -0,0 +1,26 @@ +/* Copyright (c) 2001, Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2018, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file pem.h + * + * \brief Header for pem.c + **/ + +#ifndef TOR_PEM_H +#define TOR_PEM_H + +#include "orconfig.h" +#include <stddef.h> +#include "lib/cc/torint.h" + +size_t pem_encoded_size(size_t src_len, const char *objtype); +int pem_encode(char *dest, size_t destlen, const uint8_t *src, size_t srclen, + const char *objtype); +int pem_decode(uint8_t *dest, size_t destlen, const char *src, size_t srclen, + const char *objtype); + +#endif |