evp/e_aes_cbc_hmac_sha*.c: harmonize names, fix bugs.
[openssl.git] / crypto / objects / obj_xref.c
index 6230c365a1b6a4d8b84780195f4346f17c14312d..9f744bcededb177299af010530c4537b907454dc 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/objects/obj_xref.c */
-/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 2006.
  */
 /* ====================================================================
@@ -110,8 +110,10 @@ int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid)
 #endif
        if (rv == NULL)
                return 0;
-       *pdig_nid = rv->hash_id;
-       *ppkey_nid = rv->pkey_id;
+       if (pdig_nid)
+               *pdig_nid = rv->hash_id;
+       if (ppkey_nid)
+               *ppkey_nid = rv->pkey_id;
        return 1;
        }
 
@@ -144,7 +146,8 @@ int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid)
 #endif
        if (rv == NULL)
                return 0;
-       *psignid = (*rv)->sign_id;
+       if (psignid)
+               *psignid = (*rv)->sign_id;
        return 1;
        }