![]() |
s/qmail 4.4.12
Next generation secure email transport
|
SRS library for s/qmail; refactored from srs2.c from Shevek (srs@a.nosp@m.narr.nosp@m.es.or.nosp@m.g) // the temporal physicist @ Anarres. More...
#include <time.h>#include <sys/time.h>#include "str.h"#include "sha1.h"#include "byte.h"#include "case.h"#include "stralloc.h"#include "srsq.h"#include "uint_t.h"
Go to the source code of this file.
Macros | |
| #define | SRS_TIME_PRECISION (60*60*24) /* One day */ |
| #define | SRS_TIME_BASEBITS 5 /* 2^5 = 32 = strlen(CHARS) */ |
| #define | SRS_TIME_SIZE 2 |
| #define | SRS_TIME_SLOTS (1 << (SRS_TIME_BASEBITS << (SRS_TIME_SIZE - 1))) |
Functions | |
| const char * | srs_errorstr (int code) |
| int | srs_init (srs_ctx *srs) |
| int | srs_create_timestamp (char *buf, time_t now) |
| int | srs_check_timestamp (srs_ctx *srs, char *stamp) |
| int | srs_create_hash (srs_ctx *srs, char *hash, const char *secret, char *one, char *two, char *three) |
| int | srs_check_hash (srs_ctx *srs, const char *hash, char *one, char *two, char *three) |
| int | srs_make_shortcut (srs_ctx *srs, stralloc *srsaddr, char *sendhost, char *senduser, const char *aliashost) |
| int | srs_make_guarded (srs_ctx *srs, stralloc *srsaddr, char *sendhost, char *senduser, const char *aliashost) |
| int | srs_parse_shortcut (srs_ctx *srs, stralloc *srsaddr, char *senduser) |
| int | srs_reverse (srs_ctx *srs, stralloc *srsaddr, char *inaddr) |
| int | srs_forward (srs_ctx *srs, stralloc *srsaddr, const char *sender, const char *alias) |
Variables | |
| stralloc | secret = {0} |
| stralloc | sendhost = {0} |
| stralloc | senduser = {0} |
| const char * | SRS_TIME_BASECHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567" |
| const char * | SRS_HASH_BASECHARS |
SRS library for s/qmail; refactored from srs2.c from Shevek (srs@a.nosp@m.narr.nosp@m.es.or.nosp@m.g) // the temporal physicist @ Anarres.
SRS0 address format (default delimitor: '='; could be '-,+' as first): SRS0=HHH=TT=orig-domain=orig-local-part@domain-part
Guarded address format: [wrong in SRS.pdf] SRS1=HHH=rewritten-domain-part==HHH=TT=orig-domain-part=orig-local-part@domain-part
Definition in file srsq.c.
| #define SRS_TIME_SLOTS (1 << (SRS_TIME_BASEBITS << (SRS_TIME_SIZE - 1))) |
| int srs_create_timestamp | ( | char * | buf, |
| time_t | now | ||
| ) |
| const char * srs_errorstr | ( | int | code | ) |
| const char* SRS_HASH_BASECHARS |