Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Code Reviews

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

71%
+3 −0
Code Reviews GnuTLS config for my own root CA, for use on internal server

I am trying to generate my own root CA certificate. Context My goal is to sign an intermediate CA with this certificate, and then install the intermediate CA on my own client machines. The interm...

2 answers  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 1mo ago by matthewsnyder‭

#1: Initial revision by user avatar matthewsnyder‭ · 2024-03-05T02:15:08Z (2 months ago)
GnuTLS config for my own root CA, for use on internal server
I am trying to generate my own root CA certificate.

# Context
My goal is to sign an intermediate CA with this certificate, and then install the intermediate CA on my own client machines. The intermediate CA will be used to sign a server on my private LAN. The server has no inbound route and cannot be seen from the public internet. I use the server to run my own personal services for my family.

# Code (config)
I use gnutls with the following config:
```
# https://gnutls.org/manual/html_node/certtool-Invocation.html#certtool-Invocation

# These don't actually exist but I assume it doesn't matter
cn = "nosuchdomain.com"
organization = FakeCompanyName

country = US
state = California
locality = "San Francisco"

expiration_days = 3650

dns_name = "nosuchdomain.com"

ca
cert_signing_key
```

The command to generate is:
```
certtool \
    --generate-self-signed \
    --load-privkey /path/to/private/key \
    --template /path/to/config \
    --ask-pass \
    --outfile /path/to/root/cert
```

# Review goals

My goal is to create **my own root CA** for the purpose of setting up TLS on **my own server** that is **only accessible from my own LAN**. I will not have clients install this root CA, rather, it will be used to create an intermediate CA which is not self-signed and restricted to certain domains. 

Is there anything I should change in this config, whether to avoid bugs or to be more aligned with best practices?