I'm in the process of building a Debian FreeRadius server that does 802.1x authentication for domain members. I would like to sign my radius server's SSL certificate (used for EAP-TLS) and leverage the domain's existing PKI. The radius server is joined to domain via Samba and has a machine account as displayed in Active Directory Users and Computers. The domain controller I'm trying to sign my radius server's key against does not have IIS installed so I can't use the preferred Certsrv webpage to generate the certificate. The MMC tools won't work as it can't access the certificate stores on the radius server because they don't exist. This leaves the certreq.exe utility.

I'm generating my .CSR with the following command:

openssl req -nodes -newkey rsa:1024 -keyout server.key -out server.csr

The resulting .CSR:

******@mis-ke-lnx:~/G$ openssl req -text -noout -in mis-radius-lnx.csr 
Certificate Request:
        Version: 0 (0x0)
        Subject: C=US, ST=Alaska, L=CITY, O=ORG, OU=DEPT, CN=ME/emailAddress=MYEMAIL
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (1024 bit)
                Modulus (1024 bit):
                Exponent: 65537 (0x10001)
    Signature Algorithm: sha1WithRSAEncryption

I'm trying to submit my certificate using the following certreq.exe command:

certreq -submit -attrib "CertificateTemplate:Machine" server.csr

I receive the following error upon doing so:

RequestId: 601
Certificate not issued (Denied) Denied by Policy Module The DNS name is unavailable and cannot be added to the Subject Alternate name. 0x8009480f (-2146875377)
Certificate Request Processor: The DNS name is unavailable and cannot be added to the Subject Alternate name. 0x8009480f (-2146875377)
Denied by Policy Module

My certificate authority has the following certificate templates available. If I try to submit by certreq.exe using "CertificiateTemplate:Computer" instead of "CertificateTemplate:Machine" I get an error reporting that "the requested certificate template is not supported by this CA."

cert authority

My google-foo has failed me so far on trying to understand this error... I feel like this should be a relatively simple task as X.509 is X.509 and OpenSSL generates the .CSRs in the required PKCS10 format. I can't be only one out there trying to sign a OpenSSL generated key on a Linux box with a Windows Certificate Authority, so how do I do this (perferably using the off-line certreq.exe tool)?

  • Can you perhaps post the textual output of your CSR?
    – Zoredache
    Jan 18 '12 at 0:34
  • Doh! I knew I forgot something. Edited.
    – user62491
    Jan 18 '12 at 0:49
  • In the certificate template settings for the Machine template, how do you have it configured to obtain the subject name? The email address in the subject field oughtn't sit well with the default settings of the Machine template, if I'm remembering right. Jan 18 '12 at 1:03
  • I'm not sure I understand you. I'm just using the templates that are builtin (unless some other admin in the distant pass configured them). I tried not adding a CN to my .CSR (Subject: C=US, ST=Alaska, L=CITY, O=ORG, OU=DEPT) but I still get the same error.
    – user62491
    Jan 18 '12 at 23:29

kce, what the previous poster is hinting at is to verify the properties of the Machine template. It can be found at the 'Certificate Templates' snap-in. Find that template's properties and on the 'Subject Name' tab are the settings on how the Subject Name should be provided to the CA (e.g. 'Supplied in the request' or 'Built from information in Active Directory'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy