[ssh_x509] OCSP Validation Not Working With ECC Certs

ssh_x509 at roumenpetrov.info ssh_x509 at roumenpetrov.info
Wed Jan 15 11:37:19 EET 2014


just to update you that it is working with RSA keys but now with ECC
x509v3-ecdsa-sha2-*
as 6defined in RFC  6187

*OCSP Server Log:*
12:44:14,587 INFO  [SigningEntityContainer] No card password specified.
12:44:15,088 WARN  [SigningEntityContainer] You have not specified
ocsp.p11.p11password at build time. So you need to do a manual activation.
12:44:15,339 INFO  [OCSPServletBase] Received OCSP request for certificate
with serNo: 1278a303e25b0b06, and issuerNameHash:
02139e6424c63442113bc3bba9ef5716315795f3. Client ip 10.10.10.138.
12:44:15,345 INFO  [OCSPServletBase] Adding status information (revoked)
for certificate with serial '1278a303e25b0b06' from issuer
'CN=AdminCA1,OU=admin,O=confidential,C=XX'.



On Tue, Jan 14, 2014 at 11:49 PM, Mudassir Aftab <withmudassir at gmail.com>wrote:

> *SSH Version:*
> OpenSSH_6.4, OpenSSL 1.0.1 14 Mar 2012
>
> *Patch Used: *
> openssh-6.4p1+x509-7.7.diff.gz
>
> *SSHD Config Server:*
> Protocol 2
> KeyAllowSelfIssued no
> HostKey /home/maftab/ca-admin/ssh-server-merg.pem
> AllowedCertPurpose sslclient
> CACertificateFile /home/maftab/ca-admin/CA.pem
> VAType ocspspec
> VAOCSPResponderURL
> http://internal-ocsp.confidential.com:8080/ejbca/publicweb/status/ocsp
>
> *Authorize_keys file on server:*
> ecdsa-sha2-nistp256 subject= C=XX,O=confidential,OU=admin,CN=
> ssh-x509-client.confidential.com
>
> *SSHD Config Config:*
> Protocol 2
> HostKey /home/maftab/ca-admin/ssh-client-key.pem
> CACertificateFile /home/maftab/ca-admin/CA.pem
> AllowedCertPurpose sslclient
> VAType ocspspec
> VAOCSPResponderURL
> http://internal-ocsp.confidential.com:8080/ejbca/publicweb/status/ocsp
> AuthorizedKeysFile      .ssh/authorized_keys
>
>
> *root at ssh-x509-client:/home/maftab/ca-admin# ssh -vvv -i
> ssh-x509-client-merg.pem maftab at ssh-x509*
> debug1: Can't process default engine config file: No such file or directory
> debug1: Reading configuration data /usr/local/etc/ssh_config
> debug2: hash dir '/root/.ssh/crt' added to x509 store
> debug2: hash dir '/root/.ssh/crl' added to x509 revocation store
> debug2: hash dir '/usr/local/etc/ca/crt' added to x509 store
> debug2: file '/usr/local/etc/ca/ca-bundle.crt' added to x509 store
> debug2: hash dir '/usr/local/etc/ca/crl' added to x509 revocation store
> debug1: ssh_set_validator: ignore responder url
> debug2: ssh_connect: needpriv 0
> debug1: Connecting to ssh-x509 [10.10.10.138] port 22.
> debug1: Connection established.
> debug1: permanently_set_uid: 0/0
> debug3: key_load_public(ssh-x509-client-merg.pem,...)
> debug3: Incorrect RSA1 identifier
> debug3: Could not load "ssh-x509-client-merg.pem" as a RSA1 public key
> debug1: identity file ssh-x509-client-merg.pem type -1
> debug3: key_load_public(ssh-x509-client-merg.pem-cert,...)
> debug1: identity file ssh-x509-client-merg.pem-cert type -1
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_6.4 PKIX
> debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4
> PKIX
> debug1: match: OpenSSH_6.4 PKIX pat OpenSSH*
> debug2: fd 3 setting O_NONBLOCK
> debug3: load_hostkeys: loading entries for host "ssh-x509" from file
> "/root/.ssh/known_hosts"
> debug3: x509key_from_subject: 3 is not x509 key
> debug3: key_from_blob(..., 104)
> debug3: x509_from_blob: read X509 from BIO fail error:0D0680A8:asn1
> encoding routines:ASN1_CHECK_TLEN:wrong tag
> debug3: x509key_from_blob: no X.509 certificate data
> debug3: key_from_blob(..., ...) ktype=ecdsa-sha2-nistp256
> debug3: load_hostkeys: found key type ECDSA in file
> /root/.ssh/known_hosts:1
> debug3: load_hostkeys: loaded 1 keys
> debug3: order_hostkeyalgs: prefer hostkeyalgs:
> ecdsa-sha2-nistp256-cert-v01 at openssh.com,
> ecdsa-sha2-nistp384-cert-v01 at openssh.com,
> ecdsa-sha2-nistp521-cert-v01 at openssh.com
> ,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug2: kex_parse_kexinit:
> ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
> debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01 at openssh.com,
> ecdsa-sha2-nistp384-cert-v01 at openssh.com,
> ecdsa-sha2-nistp521-cert-v01 at openssh.com
> ,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,x509v3-sign-rsa,x509v3-sign-dss,
> ssh-rsa-cert-v01 at openssh.com,ssh-dss-cert-v01 at openssh.com,
> ssh-rsa-cert-v00 at openssh.com,ssh-dss-cert-v00 at openssh.com,ssh-rsa,ssh-dss
> debug2: kex_parse_kexinit:
> aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
> aes128-gcm at openssh.com,aes256-gcm at openssh.com
> ,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,
> rijndael-cbc at lysator.liu.se
> debug2: kex_parse_kexinit:
> aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
> aes128-gcm at openssh.com,aes256-gcm at openssh.com
> ,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,
> rijndael-cbc at lysator.liu.se
> debug2: kex_parse_kexinit: hmac-md5-etm at openssh.com,
> hmac-sha1-etm at openssh.com,umac-64-etm at openssh.com,umac-128-etm at openssh.com
> ,hmac-sha2-256-etm at openssh.com,hmac-sha2-512-etm at openssh.com,
> hmac-ripemd160-etm at openssh.com,hmac-sha1-96-etm at openssh.com,
> hmac-md5-96-etm at openssh.com,hmac-md5,hmac-sha1,umac-64 at openssh.com,
> umac-128 at openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
> hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: hmac-md5-etm at openssh.com,
> hmac-sha1-etm at openssh.com,umac-64-etm at openssh.com,umac-128-etm at openssh.com
> ,hmac-sha2-256-etm at openssh.com,hmac-sha2-512-etm at openssh.com,
> hmac-ripemd160-etm at openssh.com,hmac-sha1-96-etm at openssh.com,
> hmac-md5-96-etm at openssh.com,hmac-md5,hmac-sha1,umac-64 at openssh.com,
> umac-128 at openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
> hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: none,zlib at openssh.com,zlib
> debug2: kex_parse_kexinit: none,zlib at openssh.com,zlib
> debug2: kex_parse_kexinit:
> debug2: kex_parse_kexinit:
> debug2: kex_parse_kexinit: first_kex_follows 0
> debug2: kex_parse_kexinit: reserved 0
> debug2: kex_parse_kexinit:
> ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
> debug2: kex_parse_kexinit: ecdsa-sha2-nistp256
> debug2: kex_parse_kexinit:
> aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
> aes128-gcm at openssh.com,aes256-gcm at openssh.com
> ,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,
> rijndael-cbc at lysator.liu.se
> debug2: kex_parse_kexinit:
> aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
> aes128-gcm at openssh.com,aes256-gcm at openssh.com
> ,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,
> rijndael-cbc at lysator.liu.se
> debug2: kex_parse_kexinit: hmac-md5-etm at openssh.com,
> hmac-sha1-etm at openssh.com,umac-64-etm at openssh.com,umac-128-etm at openssh.com
> ,hmac-sha2-256-etm at openssh.com,hmac-sha2-512-etm at openssh.com,
> hmac-ripemd160-etm at openssh.com,hmac-sha1-96-etm at openssh.com,
> hmac-md5-96-etm at openssh.com,hmac-md5,hmac-sha1,umac-64 at openssh.com,
> umac-128 at openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
> hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: hmac-md5-etm at openssh.com,
> hmac-sha1-etm at openssh.com,umac-64-etm at openssh.com,umac-128-etm at openssh.com
> ,hmac-sha2-256-etm at openssh.com,hmac-sha2-512-etm at openssh.com,
> hmac-ripemd160-etm at openssh.com,hmac-sha1-96-etm at openssh.com,
> hmac-md5-96-etm at openssh.com,hmac-md5,hmac-sha1,umac-64 at openssh.com,
> umac-128 at openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
> hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: none,zlib at openssh.com
> debug2: kex_parse_kexinit: none,zlib at openssh.com
> debug2: kex_parse_kexinit:
> debug2: kex_parse_kexinit:
> debug2: kex_parse_kexinit: first_kex_follows 0
> debug2: kex_parse_kexinit: reserved 0
> debug2: mac_setup: found hmac-md5-etm at openssh.com
> debug1: kex: server->client aes128-ctr hmac-md5-etm at openssh.com none
> debug2: mac_setup: found hmac-md5-etm at openssh.com
> debug1: kex: client->server aes128-ctr hmac-md5-etm at openssh.com none
> debug1: sending SSH2_MSG_KEX_ECDH_INIT
> debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
> debug3: key_from_blob(..., 104)
> debug3: x509_from_blob: read X509 from BIO fail error:0D0680A8:asn1
> encoding routines:ASN1_CHECK_TLEN:wrong tag
> debug3: x509key_from_blob: no X.509 certificate data
> debug3: key_from_blob(..., ...) ktype=ecdsa-sha2-nistp256
> debug1: Server host key: ECDSA
> 81:b4:47:6d:b4:c0:16:45:ba:9f:7f:cd:b2:70:e2:99
> debug3: load_hostkeys: loading entries for host "ssh-x509" from file
> "/root/.ssh/known_hosts"
> debug3: x509key_from_subject: 3 is not x509 key
> debug3: key_from_blob(..., 104)
> debug3: x509_from_blob: read X509 from BIO fail error:0D0680A8:asn1
> encoding routines:ASN1_CHECK_TLEN:wrong tag
> debug3: x509key_from_blob: no X.509 certificate data
> debug3: key_from_blob(..., ...) ktype=ecdsa-sha2-nistp256
> debug3: load_hostkeys: found key type ECDSA in file
> /root/.ssh/known_hosts:1
> debug3: load_hostkeys: loaded 1 keys
> debug3: load_hostkeys: loading entries for host "10.10.10.138" from file
> "/root/.ssh/known_hosts"
> debug3: x509key_from_subject: 3 is not x509 key
> debug3: key_from_blob(..., 104)
> debug3: x509_from_blob: read X509 from BIO fail error:0D0680A8:asn1
> encoding routines:ASN1_CHECK_TLEN:wrong tag
> debug3: x509key_from_blob: no X.509 certificate data
> debug3: key_from_blob(..., ...) ktype=ecdsa-sha2-nistp256
> debug3: load_hostkeys: found key type ECDSA in file
> /root/.ssh/known_hosts:1
> debug3: load_hostkeys: loaded 1 keys
> debug1: Host 'ssh-x509' is known and matches the ECDSA host key.
> debug1: Found key in /root/.ssh/known_hosts:1
> debug1: ssh_ecdsa_verify: signature correct
> debug2: kex_derive_keys
> debug2: set_newkeys: mode 1
> debug1: SSH2_MSG_NEWKEYS sent
> debug1: expecting SSH2_MSG_NEWKEYS
> debug2: set_newkeys: mode 0
> debug1: SSH2_MSG_NEWKEYS received
> debug1: Roaming not allowed by server
> debug1: SSH2_MSG_SERVICE_REQUEST sent
> debug2: service_accept: ssh-userauth
> debug1: SSH2_MSG_SERVICE_ACCEPT received
> debug2: preparing keys
> debug2: key: ssh-x509-client-merg.pem ((nil)), explicit
> debug3: input_userauth_banner
>   _____ _____ _    _     __   _______  ___   ___
>  / ____/ ____| |  | |    \ \ / / ____|/ _ \ / _ \
> | (___| (___ | |__| |_____\ V /| |__ | | | | (_) |
>  \___ \\___ \|  __  |______> < |___ \| | | |\__, |
>  ____) |___) | |  | |     / . \ ___) | |_| |  / /
> |_____/_____/|_|  |_|    /_/ \_\____/ \___/  /_/
>
> debug1: Authentications that can continue: publickey,keyboard-interactive
> debug3: start over, passed a different list publickey,keyboard-interactive
> debug3: preferred publickey,keyboard-interactive,password
> debug3: authmethod_lookup publickey
> debug3: remaining preferred: keyboard-interactive,password
> debug3: authmethod_is_enabled publickey
> debug1: Next authentication method: publickey
> debug1: Trying private key: ssh-x509-client-merg.pem
> debug1: read PEM private key begin
> debug1: read PEM private key done: type ECDSA
> debug3: sign_and_send_pubkey: ECDSA
> 09:c6:d8:e6:53:ca:4b:df:29:80:13:9e:d3:12:1d:ef
> debug2: we sent a publickey packet, wait for reply
> debug1: Authentications that can continue: publickey,keyboard-interactive
> debug2: we did not send a packet, disable method
> debug3: authmethod_lookup keyboard-interactive
> debug3: remaining preferred: password
> debug3: authmethod_is_enabled keyboard-interactive
> debug1: Next authentication method: keyboard-interactive
> debug2: userauth_kbdint
> debug2: we sent a keyboard-interactive packet, wait for reply
> debug1: Authentications that can continue: publickey,keyboard-interactive
> debug3: userauth_kbdint: disable: no info_req_seen
> debug2: we did not send a packet, disable method
> debug1: No more authentication methods to try.
> Permission denied (publickey,keyboard-interactive).
>
>



More information about the ssh_x509 mailing list