This is the cl-ses4 Reference Manual, version 1.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:23:05 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-ses4
AWS SES email sender using Signature Version 4 of Amazon’s API
Kevin Secretan <github@thejach.com>
Public Domain
1.3
dexador
(system).
ironclad
(system).
quri
(system).
cl-ppcre
(system).
local-time
(system).
arrow-macros
(system).
cl-base64
(system).
quickapp
(system).
sig.lisp
(file).
canonicalize.lisp
(file).
ses.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-ses4/sig.lisp
cl-ses4
(system).
amazon-iso-8601-basic-time
(function).
create-string-to-sign
(function).
credential-scope
(function).
derive-signing-key
(function).
hash-payload
(function).
hex-digest
(function).
hmac-sha256
(function).
sha256
(function).
sign
(function).
+amazon-iso-8601-basic-time-format+
(special variable).
+credential-scope-date-format+
(special variable).
+iso-8601-time-format+
(special variable).
yyyymmdd
(function).
cl-ses4/canonicalize.lisp
sig.lisp
(file).
cl-ses4
(system).
canonicalize-headers
(function).
canonicalize-query-string
(function).
canonicalize-signed-headers
(function).
canonicalize-uri
(function).
create-authorization-header
(function).
create-canonical-request
(function).
create-initial-ses-headers
(function).
sort-query-params
(function).
spaces-merge
(function).
trim
(function).
cl-ses4/ses.lisp
canonicalize.lisp
(file).
cl-ses4
(system).
ses4
.
*access-key*
(special variable).
*region*
(special variable).
*secret-key*
(special variable).
*ses-host*
(special variable).
main
(function).
send-raw-email
(function).
send-simple-email
(function).
*service*
(special variable).
-main
(function).
assoc-v
(function).
handle-endpoint
(function).
handle-keys
(function).
send-email
(function).
ses-error
(condition).
ses-error-msg
(reader method).
(setf ses-error-msg)
(writer method).
Packages are listed by definition order.
ses4
Primary package for cl-ses4, exports two functions for sending mail and a main function to run as a standalone program.
common-lisp
.
ses4/canonicalize
.
ses4/sig
.
*access-key*
(special variable).
*region*
(special variable).
*secret-key*
(special variable).
*ses-host*
(special variable).
main
(function).
send-raw-email
(function).
send-simple-email
(function).
*service*
(special variable).
-main
(function).
assoc-v
(function).
handle-endpoint
(function).
handle-keys
(function).
send-email
(function).
ses-error
(condition).
ses-error-msg
(generic reader).
(setf ses-error-msg)
(generic writer).
ses4/canonicalize
Functions related to canonicalizing data used
for the AWS request into the expected formats
common-lisp
.
ses4/sig
.
ses4
.
canonicalize-headers
(function).
canonicalize-query-string
(function).
canonicalize-signed-headers
(function).
canonicalize-uri
(function).
create-authorization-header
(function).
create-canonical-request
(function).
create-initial-ses-headers
(function).
sort-query-params
(function).
spaces-merge
(function).
trim
(function).
ses4/sig
Functions related to hashing and cryptographically SIGning data used for the AWS request
arrow-macros
.
common-lisp
.
amazon-iso-8601-basic-time
(function).
create-string-to-sign
(function).
credential-scope
(function).
derive-signing-key
(function).
hash-payload
(function).
hex-digest
(function).
hmac-sha256
(function).
sha256
(function).
sign
(function).
+amazon-iso-8601-basic-time-format+
(special variable).
+credential-scope-date-format+
(special variable).
+iso-8601-time-format+
(special variable).
yyyymmdd
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Returns date-time in the format YYYYMMDDTHHMMSSZ, which is required by Amazon.
Given an alist of headers, canonicalize them as per https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html The result will be a string with all header names lowercased and sorted, with each followed by a colon, a trimmed value, then a newline. The trimming process removes excess whitespace before/after the value and replaces sequential spaces with a single space.
Canonicalizes query string to AWS rules as per https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html Expects the query string either as a string in the form ’Param1=Val1&Param2=Val2’, with any equal signs in either names or values already encoded to %3D, or an alist of query params in the form ((Param1 . Val1) (Param2 . Val2)) with not-yet-encoded equal signs. Returns the query string as a string in the form ’Param1=Val1&Param2=Val2’
Return list of headers in alist of HEADERS used as the signed headers value in https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html Each header name is lowercased, sorted, and joined with a semicolon separator. Values are not included.
Canonicalizes URI as per https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html Specifically, each path segment is uri-encoded twice, and redundant or relative path components are removed.
Creates the header value part of the Authorization header defined by https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html
Following https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
constructs a canonical request given each not-yet-canonicalized parameter.
Note headers should be an alist.
Query string can be either an alist (recommended) or a string
Given a local-time:timestamp, a region, a service, and a cononical request (created by #’create-canonical-request) returns a string to sign according to https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html with AWS4-HMAC-SHA256 as the default algorithm.
Given an AWS Secret Access Key, a local-time:timestamp, region, and service,
computes the signing key as per https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html
Creates HashedPayload = Lowercase(HexEncode(Hash(payload))) using SHA256
Sends a raw email, suitable as input from something expecting a sendmail-like interface, formatted like
MIME-Version: 1.0
Content-type: text/html; charset=utf-8
From: user@example.com
To: to@example.com
Subject: Thing
<html>
...
</html>
Sends a simple text email to one recipient.
Computes signature for the derived key and string-to-sign calculated by above functions
Given an alist of query params, sorts them by param name in ascending order. Params with duplicate names are then sorted by value.
Merges sequential spaces into a single space
Trims leading/ending whitespace
Jump to: | (
-
A C D F G H M S T Y |
---|
Jump to: | (
-
A C D F G H M S T Y |
---|
Jump to: | *
+
M S |
---|
Jump to: | *
+
M S |
---|
Jump to: | C F P S |
---|
Jump to: | C F P S |
---|