Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
bb72b945
Commit
bb72b945
authored
9 years ago
by
Viktor Szakats
Committed by
Daniel Stenberg
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
CURLOPT_PINNEDPUBLICKEY.3: replace test.com with example.com
closes #443
parent
5fde69cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
+4
-4
4 additions, 4 deletions
docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
with
4 additions
and
4 deletions
docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
+
4
−
4
View file @
bb72b945
...
...
@@ -71,16 +71,16 @@ server's certificate.
# - If you don't have sed, then just copy the certificate into a file:
# Lines from -----BEGIN CERTIFICATE----- to -----END CERTIFICATE-----.
#
openssl s_client -servername www.
test
.com -connect www.
test
.com:443 < /dev/null | sed -n "/-----BEGIN/,/-----END/p" > www.
test
.com.pem
openssl s_client -servername www.
example
.com -connect www.
example
.com:443 < /dev/null | sed -n "/-----BEGIN/,/-----END/p" > www.
example
.com.pem
# extract public key in pem format from certificate
openssl x509 -in www.
test
.com.pem -pubkey -noout > www.
test
.com.pubkey.pem
openssl x509 -in www.
example
.com.pem -pubkey -noout > www.
example
.com.pubkey.pem
# convert public key from pem to der
openssl asn1parse -noout -inform pem -in www.
test
.com.pubkey.pem -out www.
test
.com.pubkey.der
openssl asn1parse -noout -inform pem -in www.
example
.com.pubkey.pem -out www.
example
.com.pubkey.der
# sha256 hash and base64 encode der to string for use
openssl dgst -sha256 -binary www.
test
.com.pubkey.der | openssl base64
openssl dgst -sha256 -binary www.
example
.com.pubkey.der | openssl base64
.fi
The public key in PEM format contains a header, base64 data and a
footer:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment