Skip to content

aws-samples/csr-builder-for-kms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

kmscsrbuilder

A Python library for creating and signing X.509 certificate signing requests (CSRs) with KMS Keys.

Related Crypto Libraries

kmscsrbuilder is a fork of csrbuilder, part of the modularcrypto family of Python packages:

Current Release

0.0.1 - changelog

Dependencies

Usage

git clone https://github.com/aws-samples/csr-builder-for-kms kmsCsrBuilder
pip3 install asn1crypto oscrypto
import sys
sys.path.append('.\kmsCsrBuilder')

from kmscsrbuilder import KMSCSRBuilder, pem_armor_csr

kms_arn = 'arn:aws:kms:eu-west-1:111122223333:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111'

builder = KMSCSRBuilder(
    {
        'country_name': 'IE',
        'state_or_province_name': 'Meath',
        'locality_name': 'Meath',
        'organization_name': 'Palmep Tech',
        'common_name': 'Patrick',
    },
    kms_arn
)

# Add subjectAltName domains
builder.subject_alt_domains = ['xks.palmep.tech', 'www.palmep.tech']
request = builder.build_with_kms(kms_arn)

with open('.\example-kms.csr', 'wb') as f:
    f.write(pem_armor_csr(request))

License

kmscsrbuilder is licensed under the terms of the MIT license. See the LICENSE file for the exact license text.

Documentation

kmscsrbuilder documentation

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages