[ssh_x509] pkixssh-8.0b0 and ECDSA public key algorithm for SSH (RFC 6187)

ssh_x509 at roumenpetrov.info ssh_x509 at roumenpetrov.info
Mon Feb 3 19:45:12 EET 2014


Hi Roumen,

Many thanks for  writing ECC X509 beta patch and prompt reply.  I am
getting following error

ssh_x509store_cb:
subject='CN=ssh-x509.confidential.net,OU=admin,O=confidential',
error 20 at 0 depth lookup:unable to get local issuer certificate
ssh_verify_cert: verify error, code=20, msg='unable to get local issuer
certificate'
key_verify failed for server_host_key

Also its seems that patches are already applied in pkixssh-8.0b0, please
correct me if i am wrong. Also find detailed logs and config in attached
file.

Regards,
Mudassir Aftab


On Sun, Feb 2, 2014 at 7:14 PM, <ssh_x509 at roumenpetrov.info> wrote:

> Hello,
>
> I just upload a initial beta pack with sources that add support for
> x509v3-ecdsa-sha2-* public key algorithm for SSH as is specified in RFC
> 6187.
>
> The compressed archive could be downloaded from http://roumenpetrov.info/
> openssh/test-packs/pkixssh-8.0b0_20140131.tgz . The tarbal contains
> extract from source repository - "pkixssh-8.0b0.tar" and patch set in
> subdirectory 7.8-8.0b0.
> The pack is only for testing purposes and could be removed at any time.
>
>
> Please review patches for compatibility of implementation with RFC 6187 .
>
> To use  x509v3-ecdsa-sha2-* identity file has to contain more then one
> certificate - the certificate that match private key and certificates that
> could be used to construct certificate chain for verification.
>
>
> Regards,
> Roumen Petrov
>
>
> _______________________________________________
> ssh_x509 mailing list
> ssh_x509 at roumenpetrov.info
> http://roumenpetrov.info/mailman/listinfo/ssh_x509_roumenpetrov.info
>
-------------- next part --------------

Ubuntu 12.04
openssl: 1.0.1f
zlib: 1.2.8.dfsg-1
zlib1g-dev: 1:1.2.8.dfsg
zlibc: 0.9k-4.1
OpenSSH: OpenSSH_6.5

/opt/dev/pkixssh-8.0b0_20140131/pkixssh-8.0b0
./configure
make
make install 

Error:
debug3: ssh_x509store_verify_cert: for 'CN=ssh-x509.confidential.net,OU=admin,O=confidential'
ssh_x509store_cb: subject='CN=ssh-x509.confidential.net,OU=admin,O=confidential', error 20 at 0 depth lookup:unable to get local issuer certificate
ssh_verify_cert: verify error, code=20, msg='unable to get local issuer certificate'
debug3: ssh_x509store_verify_cert: return -1(error)

authorized_keys:
x509v3-ecdsa-sha2-nistp256 subject= O=confidential,OU=admin,CN=ssh-x509-client.confidential.net,emailAddress=sa at confidential.com

server sshd_config:
Protocol 2
HostKey /root/server-certs/ssh-x509-merg.pem
CACertificateFile /root/server-certs/CA.pem
X509KeyAlgorithm x509v3-ecdsa-sha2-nistp256,ecdsa-sha2-nistp256
AllowedCertPurpose any    (also tried with sslclient)
CACertificatePath /root/server-certs   
VAType ocspspec
VAOCSPResponderURL http://internal-ocsp.dev.confidential.net:8080/ejbca/publicweb/status/ocsp
	

client sshd_config:
HostKey /root/client-certs/ssh-x509-client-key.pem
CACertificateFile /root/client-certs/CA.pem
X509KeyAlgorithm x509v3-ecdsa-sha2-nistp256,ecdsa-sha2-nistp256
AllowedCertPurpose sslclient
VAType ocspspec
VAOCSPResponderURL http://internal-ocsp.dev.confidential.net:8080/ejbca/publicweb/status/ocsp

SSH:
root at ssh-x509-client:~/client-certs# ssh -vvv -i ssh-x509-client.pem maftab at ssh-x509
OpenSSH_6.5, OpenSSL 1.0.1f 6 Jan 2014
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: 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.0.0.221] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug3: key_load_public(ssh-x509-client.pem,...)
debug3: Incorrect RSA1 identifier
debug3: Could not load "ssh-x509-client.pem" as a RSA1 public key
debug1: identity file ssh-x509-client.pem type -1
debug3: key_load_public(ssh-x509-client.pem-cert,...)
debug1: identity file ssh-x509-client.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.5 PKIX
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.5 PKIX
debug1: match: OpenSSH_6.5 PKIX pat OpenSSH* compat 0x04000000
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(13, [Subject:CN=ssh-x509.confidential.net,OU=admin,O=confidential
]) called
debug3: x509key_from_subject: subject=[CN=ssh-x509.confidential.net,OU=admin,O=confidential
]
debug3: ssh_X509_NAME_add_entry_by_NID: type=ASCII, k=18
debug3: ssh_X509_NAME_add_entry_by_NID: type=ASCII, k=5
debug3: ssh_X509_NAME_add_entry_by_NID: type=ASCII, k=5
debug3: x509key_str2X509NAME: return 1
debug3: x509key_from_subject: return 0xe32b70
debug3: load_hostkeys: found key type X509(ecdsa) in file /root/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: x509v3-ecdsa-sha2-nistp256,x509v3-ecdsa-sha2-nistp384,x509v3-ecdsa-sha2-nistp521,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: curve25519-sha256 at libssh.org,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: x509v3-ecdsa-sha2-nistp256,x509v3-ecdsa-sha2-nistp384,x509v3-ecdsa-sha2-nistp521,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-ed25519-cert-v01 at openssh.com,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-ed25519,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,chacha20-poly1305 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,chacha20-poly1305 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: curve25519-sha256 at libssh.org,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: x509v3-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,chacha20-poly1305 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,chacha20-poly1305 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(..., 588)
debug3: x509_to_key: X509_get_pubkey done!
debug1: Server host key: ECDSA+cert c7:d3:61:7f:62:9f:b9:46:e1:cb:e6:de:7b:1c:91:5c
debug3: load_hostkeys: loading entries for host "ssh-x509" from file "/root/.ssh/known_hosts"
debug3: x509key_from_subject(13, [Subject:CN=ssh-x509.confidential.net,OU=admin,O=confidential
]) called
debug3: x509key_from_subject: subject=[CN=ssh-x509.confidential.net,OU=admin,O=confidential
]
debug3: ssh_X509_NAME_add_entry_by_NID: type=ASCII, k=18
debug3: ssh_X509_NAME_add_entry_by_NID: type=ASCII, k=5
debug3: ssh_X509_NAME_add_entry_by_NID: type=ASCII, k=5
debug3: x509key_str2X509NAME: return 1
debug3: x509key_from_subject: return 0xe36b30
debug3: load_hostkeys: found key type X509(ecdsa) in file /root/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug3: load_hostkeys: loading entries for host "10.0.0.221" from file "/root/.ssh/known_hosts"
debug3: x509key_from_subject(13, [Subject:CN=ssh-x509.confidential.net,OU=admin,O=confidential
]) called
debug3: x509key_from_subject: subject=[CN=ssh-x509.confidential.net,OU=admin,O=confidential
]
debug3: ssh_X509_NAME_add_entry_by_NID: type=ASCII, k=18
debug3: ssh_X509_NAME_add_entry_by_NID: type=ASCII, k=5
debug3: ssh_X509_NAME_add_entry_by_NID: type=ASCII, k=5
debug3: x509key_str2X509NAME: return 1
debug3: x509key_from_subject: return 0xe37550
debug3: load_hostkeys: found key type X509(ecdsa) in file /root/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug3: ssh_ASN1_PRINTABLESTRING_cmp: a->type=12(UTF8STRING) is not PrintableString
debug3: ssh_ASN1_PRINTABLESTRING_cmp: a->type=12(UTF8STRING) is not PrintableString
debug3: ssh_ASN1_PRINTABLESTRING_cmp: a->type=12(UTF8STRING) is not PrintableString
debug3: ssh_ASN1_PRINTABLESTRING_cmp: a->type=12(UTF8STRING) is not PrintableString
debug3: ssh_ASN1_PRINTABLESTRING_cmp: a->type=12(UTF8STRING) is not PrintableString
debug3: ssh_ASN1_PRINTABLESTRING_cmp: a->type=12(UTF8STRING) is not PrintableString
debug1: Host 'ssh-x509' is known and matches the ECDSA+cert host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug3: ssh_x509_verify: signature format = x509v3-ecdsa-sha2-nistp256
debug3: ssh_x509_verify: md=ecdsa-sha2-nistp256, loc=4
debug3: ssh_x509store_verify_cert: for 'CN=ssh-x509.confidential.net,OU=admin,O=confidential'
ssh_x509store_cb: subject='CN=ssh-x509.confidential.net,OU=admin,O=confidential', error 20 at 0 depth lookup:unable to get local issuer certificate
ssh_verify_cert: verify error, code=20, msg='unable to get local issuer certificate'
debug3: ssh_x509store_verify_cert: return -1(error)
debug3: ssh_x509_verify: return -1
key_verify failed for server_host_key


More information about the ssh_x509 mailing list