24 posts categorized "java"


Groovy: New EVNark Release - v0.3.5

This Halloween weekend before taking the kids out, I did some googling and found a large enough number of new Policy OIDs that a new evnark release was warranted.  New in this release is recognition of extended validation certificates from AffirmTrustTrustCenter (aka TC TrustCenter), Certum, and Keynectis.  

In addition. some CA's have multiple OIDs for their EV certs, so, I have added additional EV OIDs for GoDaddy, DigiCert, and Izenpe.  

The changes in this release brings the number of Extended Validation Certificate CAs recognized by EVNark up to 27, which, if I am not mistaken, are more certs recognized by evnark than by Safari, Chrome, or Firefox.

The EVNark page has been updated and you can download a copy directly off that page.  Updated source is below.


#!/usr/bin/env groovy
// usage: 'evnark [-h/--host "hostname"] [-p/--port "port"]'
// v0.2 
//   + Adds hostname lookup exception handling
//   + Adds connection Timeout exception handling
//   + Modified the output so that it will now state
//     whether or not an EV cert was found.
// v0.3
//   + changed display so that successes are now
//     displayed with a green bar
// v0.3.5
//   + Added TrustCenter aka TC TrustCenter
//   + Added Certum
//   + Added KEYNECTIS
//   + Added additional ev policy id's for GoDaddy, Digicert, Izenpe

import java.security.*
import javax.net.ssl.*
import sun.security.x509.* 

/* This section sets up the command 
   line arguments portion of this script. */ 

def cli = new CliBuilder( usage: 'evnark [-h/--host "hostname"] [-p/--port "port"]' )
  cli.h( longOpt:'host', args:1, required:true, type:GString, 'The host or site you want to test' )
  cli.p( longOpt:'port', args:1, required:false, type:GString, 'Optional. Defaults to port 443')

def opt = cli.parse(args)
  if (!opt) return
  if (opt.h) host = opt.h

def port = 443
  if (opt.p) port = Integer.parseInt(opt.p)

// Create the socket
def factory = SSLSocketFactory.getDefault()

try {
  socket = factory.createSocket()
  socketaddr = new InetSocketAddress(host, port)
  socket.connect(socketaddr, 5000)
  } catch(UnknownHostException ex) {
      println "Hostname Resolution Failed.  Is ${host} a valid host?"
  } catch(SocketTimeoutException ex) {
      println "Connection Timed Out. Is ${host} up or available?"

try {
  socket.addHandshakeCompletedListener( new listener() )
  } catch(SSLHandshakeException ex) {
  } catch(SSLException ex) {
      println "The port number you specified (${port}) does not appear to be an ssl port"

  class listener implements HandshakeCompletedListener {
  void handshakeCompleted(HandshakeCompletedEvent e) {

  def ev_oids = [
    // 'A-Trust GmbH':' Doesn't appear to offer the .yet',
    'AC Camerfirma SA':'',
    'Buypass AS':'2.16.578.',
    'Comodo CA Limited':'',
    'Cybertrust, Inc':'',
    'D-TRUST GmbH':'',
    // 'DanID':' Doesn't appear to offer the yet ',
    'DigiCert Inc':'2.16.840.1.114412.2.1',
    'DigiCert Inc':'2.16.840.1.114412.',
    // 'Echoworx Corporation':' Doesn't appear to offer them yet',
    'Entrust, Inc.':'2.16.840.1.114028.10.1.2',
    'GeoTrust Inc.':'',
    // 'Getronics PinkRoccade':'Doesn't appear to offer them yet',
    'GlobalSign nv-sa':'',
    'The Go Daddy Group, Inc.':'2.16.840.1.114413.',
    'The Go Daddy Group, Inc. (Starfield)':'2.16.840.1.114414.',
    // 'IdenTrust, Inc.':' Doesn't appear to offer the yet',
    // 'IpsCA, IPS Certification Authority s.l.':' ',
    'Izenpe S.A.':'',
    'Izenpe S.A.':'',
    'KEYNECTIS (aka Certplus)':'',
    'Network Solutions L.L.C.':'',
    'QuoVadis Limited':'',
    // 'RSA Security, Inc.':' ',
    'SECOM Trust Systems CO.,LTD.':'1.2.392.200091.100.721.1',
    'SecureTrust Corporation':'2.16.840.1.114404.',
    // 'Skaitmeninio sertifikavimo centras (SSC)':' ',
    'StartCom Ltd.':'',
    'Starfield Technologies':'2.16.840.1.114414.',
    'SwissSign AG':'2.16.756.',
    // 'T-Systems Enterprise Services GmbH':' ',
    'TC TrustCenter GMBh':'',
    'Thawte, Inc.':'2.16.840.1.113733.',
    // 'Trustis Limited':Doesn't appear to offer them yet',
    'ValiCert, Inc.':'2.16.840.1.114414.',
    'VeriSign, Inc.':'2.16.840.1.113733.',
    'Wells Fargo WellsSecure':'2.16.840.1.114171.500.9'

  def certs = e.getPeerCertificates()
  def crt = certs[0]
  def intcrt = certs[1]

  def ext = crt.getCertificatePoliciesExtension()
  def policies = ext.get(CertificatePoliciesExtension.POLICIES)
    for ( PolicyInformation info in policies ) {
      CertificatePolicyId id = info.getPolicyIdentifier()
        def certpolicyid = id.getIdentifier().toString()
        //println ""
        //println "Found Certificate Policy ID: ${certpolicyid}"
      if ( ev_oids.any { it.value == certpolicyid } )
        println "\033[0;42m" + " This host uses an Extended Validation Cert " + "\033[0m" + "\nThe Certficate Policy ID is: ${certpolicyid}\n"
        println "This host does NOT use an Extended Validation Cert\nThe Certificate Policy ID is: ${certpolicyid}\n"




Groovy News: Gaelyk 0.5 Released

A major new upgrade was just announced for Gaelyk.  Version 0.5 was released.  New in this release, (which I have copied from the release announcement):

In addition to these new features, the version of Groovy was upgraded to 1.7.5 (including a performance improvement affecting Gaelyk), and some bugs were fixed, like the include and caching combination.

You can download this new version here, and see the release notes:



Groovy News: Gaelyk 0.4.4 Released

Gaelyk 0.4.4 was just released.  Get it from the Download section on the Gaelyk site.  New in this version, (copied/pasted from the announcement):

  • Updated the Google App Engine SDK to the latest 1.3.7 version
  • Jabber and incoming email groovlets now have their implicit logger (gaelyk.email and gaelyk.jabber)
  • Plugins are now impacting Jabber and incoming email groovlets as well
  • Fixed a bug the conversion of String to Datastore's Category type (thanks for the contribution!)
  • Internal refactorings of the caching logic
  • Added namespace support for multitenancy, added in SDK 1.3.7:
    • a namespace is added in the binding, pointing at NamespaceManager, the SDK class dealing with 
    • new method namespace.of("customerA") { ... } to execute a closure in the context of a specific namespace