Commit graph

8 commits

Author SHA1 Message Date
Brannon King
e72f99ac3f renamed package to lbcutil, updated refs to it 2021-09-10 16:37:45 -04:00
David Hill
d32feb0a8e build: replace travis with github ci 2020-10-26 09:48:59 -04:00
Josh Rickmar
9ffb1ecd80 Add Common Name to certificate.
Some applications fail to parse the certificate if the CN is not set,
even if they (correctly) check SANs before the CN when validating a
hostname.  Even though the CN should be ignored if a matching SAN
hostname was found, we can prevent the parse from failing by also
including the hostname as the CN.

Additionally, switch from maps to slices to prevent DNS names and IP
addresses from being reordered when added to the certificate template.
2015-06-15 16:14:08 -04:00
Dave Collins
1b73e9828d Relicense to the btcsuite developers. 2015-05-01 12:41:58 -05:00
David Hill
c64741f903 Add PEM encode error checking 2014-12-13 10:29:36 -05:00
Jonathan Gillham
47c887338f Made App Engine runtime compatible. 2014-08-30 15:10:29 -05:00
Dave Collins
759451c046 Correct and improve cert generation.
This commit changes three things with cert generation.

- The extended key usage field has been removed since specifying the
  extended key usage field prevents the cert from working with firefox
  even when it specifies it can be used as a server
- Creates a random serial number since browsers like firefox and chrome
  won't accept two certificates with the same issuer and serial number
- Adds the digital signature key usage capability since some validators
  like node.js expect that instead of key encipherment
2014-01-29 03:48:46 -06:00
Josh Rickmar
b651766231 Add NewTLSCertPair to generate a certificate pair.
btcd, btcwallet, and an upcomming standalone tool to generate the TLS
certificates all need a way to generate TLS certificate pairs.  This
function, adapted from the cert gen code in btcd, abstracts this logic
so all programs can reuse the code.

Unlike the older btcd certificate generation code, this new function
allows specifying additional hostnames and IPs to add to the list of
addresses for which the cert is valid.
2014-01-10 15:35:55 -05:00