google-app-engine"/>
  • 4
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I'm trying to upload and use a custom SSL certificate and private key which I've generated using my own personal CA I've created.

I've gone through all the steps in their guide to doing so: https://cloud.google.com/appengine/docs/standard/nodejs/securing-custom-domains-with-ssl#converting_private_keys_and_concatenating_ssl_certificates

But when I attempt to upload the certificate and key I get the following error: The certificate data is invalid. Please ensure that the private key and public certificate match.

enter image description here

I've tried a variety of encodings, chain orders, etc but I always get this same error. I don't see anything explicitly calling out that you can have your own custom CA so I'm curious if that's the problem.

The raw HTTP response body I get from the upload API request (console) is the following:

)]}'
{"code":3,"trackingId":"8598058641280346134","errorSpace":"generic","status":400,"message":"backend error"}

Since I'm just doing a dev instance of this for now to ensure it's possible, here's my test certificate chain and private key (THESE ARE NOT USED IN PRODUCTION, I'M POSTING THEM INTENTIONALLY TO HELP DEBUG THIS ISSUE, THEY ARE NOT SENSITIVE DATA):

The certificate chain:

-----BEGIN CERTIFICATE-----
MIID8TCCAtmgAwIBAgIJAL27hhOcC13lMA0GCSqGSIb3DQEBCwUAMGcxCzAJBgNV
BAYTAlVTMRMwEQYDVQQKEwpHcmFudFByb3h5MQswCQYDVQQIEwJDQTEhMB8GA1UE
CxMYR3JhbnRQcm94eSBCcm93c2VyIFByb3h5MRMwEQYDVQQDEwpHcmFudFByb3h5
MB4XDTIwMDQwODIwMzQ1OVoXDTIxMDQwODIwMzQ1OVowWDELMAkGA1UEBhMCVVMx
CzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMSQwIgYDVQQDDBtj
YS10ZXN0LXBhZ2UuZ3JhbnRwcm94eS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB
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vDmAEJrLeNJGt7HKpW5jm9DduIHE
MrariM/SK+pzH0erWXmPU9PZOYaiJ+gtYWxJcDUCgYEAw5UA1LcU0jELMmjb9zun
elrwv+Evq/fAjqPk8qDSEZGypepHq2yYMxZ5ZJWGsikdjTORQwuEt7zlnMiczGjN
6a3qc46wcoRw+2y9PRqa2g739MTgkjDHImnlZYbKYlGCVhO/3FmNcvgLH+UDZX7W
zm7agonwne+vkMvirdrXhr0CgYA6LRbhIikPIvGSQEcRZW9VcajI85dxnIv8K+Rw
PPXsw0dP4v3KI0sRDN5OUaitQ+yEFCj/rea774L1TUv5KHZ9Dhqp7d45kLucCgbq
0DuABoyYeP8GBQVbCuCrklcv3H40u6npQZOO60FJ0kvNbd/8urzMUDmsj7xi77hD
+pA5LQKBgQDzfT+YDhp6ERxgnj18gjh7bQIFlGobvf9DTy6F+yhvLYWCPfOOo5do
evKlFnUyNwtcTY0zCko4Tr7yvm6Dfwb/vrCPdLcC/GJJOR8wtRLIs5A18kZNNVF5
wBvGH6PqufGWqbToJwaXFFrhIJl0wsKnreTqxuPnDRwu8ExnbNMRbQ==
-----END RSA PRIVATE KEY-----
      • 2
    • The only thing I can think of is that the system is using naive validation and is validating that the entire chain matches your private key, not just the first certificate in the chain. If you remove the second cert from the chain (the one with the CN of GrantProxy), does it validate then? I realise the instructions have told you to concatenate them, and normally you would, but it's worth a test?
      • 2
    • Thanks Mark, I did try that - I only tried the chaining because I couldn't get the original setup to work.

Trending Tags