Skip to content

Commit

Permalink
Extend certificate length.
Browse files Browse the repository at this point in the history
The 1024 bits certificates are not considered secure anymore and are
rejected on various places already. Use 4096 bits certificates instead.
  • Loading branch information
voxik committed Feb 12, 2021
1 parent b50c135 commit 77b6ca3
Showing 1 changed file with 80 additions and 45 deletions.
125 changes: 80 additions & 45 deletions ext/ssl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,56 +33,91 @@ static X509 *DefaultCertificate = NULL;

static char PrivateMaterials[] = {
"-----BEGIN RSA PRIVATE KEY-----\n"
"MIIEpAIBAAKCAQEA25ZTHopLfMKYeVwZoWtDwBd1RqCJhIL7wgDy/05jzIYm8JFf\n"
"xwFI+pau/3mLVHYPrl9rXeM5ZBONeLwewDJAsIYVtyZ8O9pICK6uz4sogfwST8Uc\n"
"/sumdd/mq2vIw4zEGjcaXdmMZYrJOxlvx32Fsrc5M6iNIMQYFnLPU3KsJhvOAZiM\n"
"6jEn2wIszhq5X/5HupaOuCaZqCxOtaXaWguJF4SGFW6tBMxaY4ryiLyUwC0EGPoH\n"
"C2f34DxeXpRQ9TNS3H//L90wTok6slrqZQ/4zXU64+0pd5q35FqnS7gU7H6SQ9yj\n"
"TWPPe/gNTVPWoQd9SJJmB7Q1BYukcfDnh69NBwIDAQABAoIBABErG6yTm3tRq6Ix\n"
"dT+Np2ppax3uh1H4+74bXORhOKRRCNJeS2K/0vjktyH6Ws5rvKYhh797eI0+ih0a\n"
"eD0GsNAca646MBRt6JvlLH3Fn5EqKDRccPvq6ETnEJ3ue2/unZZ/IGyeCcAWrc0V\n"
"HAw44C8s7CgB0abyLf/zUgpwOM1x0etDpIiMBEUxpV+aG5wsAAcj3Q0rkxUhfIgS\n"
"QB1eWGgN/irfaUqPOwXZ85cWBVQlck1eCKeWJJkHffcqfqfcuy2d8W5PN0DeD3kS\n"
"QW/+hXnxSU39/DymsomsjKnrB4IwW6lVGxRXyVhMiz3bxmEmRK7YdkCzsDO8VWBa\n"
"bcctQgECgYEA/jIzxNw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z8pya8h7uvp2wKtlSNUqpXmCvsl+X/zib2YRwI/\n"
"QvxbM4J50AGyIiqXzuULCg2ap9t7Zpc9/+hg0t5BEbym+RbcNLy+lh4ZjrEwH3Xe\n"
"LNIU1lM0Xyg0SY6o1hfH3eiRukedhlametaIGwYG6n5gzYgh7T4W+uI=\n"
"-----END CERTIFICATE-----\n"};

/* These private materials were made with:
* openssl req -new -x509 -keyout cakey.pem -out cacert.pem -nodes -days 6500
* openssl req -new -x509 -keyout cakey.pem -out cacert.pem -nodes -days 6500 -pkeyopt rsa_keygen_bits:4096
* TODO: We need a full-blown capability to work with user-supplied
* keypairs and properly-signed certificates.
*/
Expand Down

0 comments on commit 77b6ca3

Please sign in to comment.